-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
100 lines (100 loc) · 2.58 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-vcs-permalinks
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- id: check-added-large-files
args: ["--maxkb=1000"]
- id: check-toml
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
name: Add license for all python files
files: \.py$|\.pyi$
args:
[
--comment-style,
'"""||"""',
--license-filepath,
license-templates/LICENSE.txt,
--fuzzy-match-generates-todo,
--use-current-year,
--no-space,
]
- id: insert-license
name: Add license for all Markdown files
files: \.md$
args:
[
--comment-style,
"<!--||-->",
--license-filepath,
license-templates/LICENSE.txt,
--fuzzy-match-generates-todo,
--no-space,
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff-format
name: Run Ruff Formater
exclude: |
(?x)(
^build/|
^docker/
)
- id: ruff
name: Run Ruff Linter
args: [--fix, --exit-non-zero-on-fix]
exclude: |
(?x)^(
^build/|
^docker/|
^tests/
)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.0
hooks:
- id: mypy
name: Run Mypy (Static type checker)
exclude: |
(?x)(
^build/|
^docker/|
^tests/
)
additional_dependencies:
[
"strawberry-graphql[fastapi]",
pydantic,
pydantic-settings,
sqlmodel,
]
- repo: https://github.com/python-poetry/poetry
rev: "1.8.0"
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: [-o, requirements.txt]
- id: poetry-export
args: [-o, requirements_dev.txt, --with=docs]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
- id: commitizen-branch
stages:
- post-commit
- push