-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
139 lines (127 loc) · 3.65 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
default_language_version:
python: python3.11
repos:
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: "hatch run test"
language: system
pass_filenames: false
always_run: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-symlinks
- id: debug-statements
- id: mixed-line-ending
- id: pretty-format-json
- id: check-builtin-literals
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
- id: name-tests-test
args: [--pytest-test-first]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py311-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# for checks not yet available in ruff
- repo: https://github.com/pycqa/flake8
rev: '6.1.0'
hooks:
- id: flake8
additional_dependencies: [
# "dlint",
"flake8-aaa",
"flake8-annotations",
"flake8-annotations-complexity",
"flake8-annotations-coverage",
"flake8-breakpoint",
"flake8-broken-line",
"flake8-coding",
"flake8-cognitive-complexity",
"flake8-comments",
"flake8-encodings[classes]",
"flake8-expression-complexity",
# "flake8-fastapi",
"flake8-fixme",
"flake8-functions",
"flake8-functions-names",
"flake8-future-annotations",
"flake8-literal",
"flake8-markdown",
"flake8-mutable",
"flake8-noqa",
"flake8-pylint",
"flake8-pyproject",
"flake8-rst-docstrings",
"flake8-secure-coding-standard",
"flake8-string-format",
"flake8-typing-imports",
"flake8-use-fstring",
"flake8-useless-assert",
"flake8-variables-names",
"flake8-warnings",
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
exclude: ^docs/conf.py
additional_dependencies:
- types-dataclasses >= 0.1.3
- types-PyYAML
- tomli >= 0.2.6, < 2.0.0
- types-typed-ast >= 1.4.1
# - click >= 8.1.0
- packaging >= 22.0
- platformdirs >= 2.1.0
- pytest
- hypothesis
# - django-stubs[compatible-mypy]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.1
hooks:
- id: check-github-workflows
- id: check-github-actions
- repo: https://github.com/jsh9/pydoclint
rev: 0.3.8
hooks:
- id: pydoclint
args:
- "--config=pyproject.toml"
# - repo: https://github.com/Riverside-Healthcare/djLint
# rev: v1.34.0
# hooks:
# - id: djlint-reformat-django
# - id: djlint-django
- repo: https://github.com/econchick/interrogate
rev: 1.4.0
hooks:
- id: interrogate
pass_filenames: false