-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
78 lines (71 loc) · 2.31 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
default_install_hook_types: [pre-commit, prepare-commit-msg, commit-msg]
ci:
autofix_commit_msg: ":rotating_light: auto fix by pre-commit hooks"
autofix_prs: true
autoupdate_branch: master
autoupdate_schedule: monthly
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
repos:
- repo: local
hooks:
- id: commit-with-pre-commit
name: Commit with Pre-commit
entry: python scripts/commit_with_pre_commit.py
language: python
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-toml
exclude: poetry.lock|.*template/pyproject.template$
- id: check-yaml
- id: pretty-format-json
args: [--autofix, --indent, "4", --no-ensure-ascii, --no-sort-keys]
- id: check-symlinks
- id: end-of-file-fixer
- id: name-tests-test
args: [--pytest-test-first]
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, "2", --offset, "2", --preserve-quotes]
stages: [commit]
- id: pretty-format-toml
args: [--autofix, --no-sort, --indent, "4"]
exclude: poetry.lock|.*template/pyproject.template$
stages: [commit]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]
- id: ruff-format
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [commit]
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
stages: [commit]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
args: [--strict, --ignore-missing-imports]
# https://stackoverflow.com/questions/75645065/error-untyped-decorator-typeguard-makes-function-add-two-untyped-misc
additional_dependencies: [pydantic, pytest, click]
stages: [commit]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.27.0
hooks:
- id: commitizen
stages: [commit-msg]