14
14
15
15
for more information, see https://pre-commit.ci
16
16
autofix_prs : false
17
- autoupdate_branch : ' master '
17
+ autoupdate_branch : ' '
18
18
autoupdate_commit_msg : ' [pre-commit.ci] pre-commit autoupdate'
19
19
autoupdate_schedule : monthly
20
20
skip : []
@@ -27,34 +27,81 @@ repos:
27
27
hooks :
28
28
# Identify invalid files
29
29
- id : check-ast
30
+ name : check-ast (Python)
31
+ description : " Check for syntax errors in Python files."
32
+
30
33
- id : check-yaml
34
+ name : check-yaml (YAML)
35
+ description : " Check for syntax errors in YAML files."
36
+
31
37
- id : check-json
38
+ name : check-json (JSON)
39
+ description : " Check for syntax errors in JSON files."
40
+
32
41
- id : check-toml
42
+ name : check-toml (TOML)
43
+ description : " Check for syntax errors in TOML files."
44
+
33
45
- id : check-xml
46
+ name : check-xml (XML)
47
+ description : " Check for syntax errors in XML files."
34
48
35
49
# git checks
36
50
- id : check-merge-conflict
51
+ name : Check for merge conflict strings
52
+ description : " Check for files that contain merge conflict strings."
53
+
37
54
- id : check-added-large-files
55
+ name : Check for large files
56
+ description : " Check for large files that were added to the repository."
38
57
args :
39
58
- --maxkb=1000
59
+
40
60
- id : detect-private-key
61
+ name : Detect private key
62
+ description : " Check for private keys in the repository."
63
+
41
64
- id : check-case-conflict
65
+ name : Check for case conflicts
66
+ description : " Check for files with names that differ only in case."
42
67
43
68
# Python checks
44
69
- id : check-docstring-first
70
+ name : Check for docstring in first line
71
+ description : " Check that the first line of a file is a docstring."
72
+
45
73
- id : debug-statements
74
+ name : Check for debug statements
75
+ description : " Check for print statements and pdb imports."
76
+
46
77
- id : requirements-txt-fixer
78
+ name : Fix requirements.txt
79
+ description : " Fix the formatting of requirements.txt files."
80
+
47
81
- id : fix-encoding-pragma
82
+ name : Fix encoding pragma
83
+ description : " Fix the encoding pragma in Python files."
48
84
args :
49
85
- --remove
86
+
50
87
- id : fix-byte-order-marker
88
+ name : Fix byte order marker
89
+ description : " Fix the byte order marker in Python files."
90
+
51
91
- id : check-builtin-literals
92
+ name : Check for built-in literals
93
+ description : " Check for built-in literals in Python code."
52
94
53
95
# General quality checks
54
96
- id : mixed-line-ending
97
+ name : Mixed line ending
98
+ description : " Check for mixed line endings."
55
99
args :
56
100
- --fix=lf
101
+
57
102
- id : trailing-whitespace
103
+ name : Trailing whitespace
104
+ description : " Check for trailing whitespace."
58
105
args :
59
106
- --markdown-linebreak-ext=md
60
107
exclude : |
@@ -63,29 +110,43 @@ repos:
63
110
locale/|
64
111
static/(.*)/libs/
65
112
)
113
+
66
114
- id : check-executables-have-shebangs
115
+ name : Check for shebangs in executables
116
+ description : " Check that executables have shebangs."
117
+
67
118
- id : end-of-file-fixer
119
+ name : End of file fixer
120
+ description : " Ensure that files end with a newline."
68
121
exclude : |
69
122
(?x)(
70
123
.min(.css|.css.map|.js|.js.map)|
71
124
locale/|
72
125
static/(.*)/libs/
73
126
)
74
127
75
- - repo : https://github.com/pre-commit/mirrors- eslint
128
+ - repo : https://github.com/eslint/ eslint
76
129
rev : v8.56.0
77
130
hooks :
78
131
- id : eslint
132
+ name : ESLint
133
+ description : " Check for problems in JavaScript files."
79
134
exclude : |
80
135
(?x)(
81
136
.min(.js|.js.map)|
82
137
static/(.*)/libs/
83
138
)
139
+ # additional_dependencies:
140
+ # # eslint itself needs to be here when using additional_dependencies.
141
+ # - [email protected] # https://github.com/eslint/eslint/releases/latest
142
+ # - [email protected] # https://github.com/sindresorhus/globals/releases/latest
84
143
85
144
- repo : https://github.com/thibaudcolas/pre-commit-stylelint
86
- rev : v16.1.0
145
+ rev : v16.2.1
87
146
hooks :
88
147
- id : stylelint
148
+ name : Stylelint
149
+ description : " Check for problems in CSS files."
89
150
exclude : |
90
151
(?x)(
91
152
.min(.css|.css.map)|
@@ -95,23 +156,42 @@ repos:
95
156
- --formatter=compact
96
157
additional_dependencies :
97
158
# stylelint itself needs to be here when using additional_dependencies.
98
- - stylelint@16.1.0 # https://github.com/stylelint/stylelint/releases/latest
159
+ - stylelint@16.2.1 # https://github.com/stylelint/stylelint/releases/latest
99
160
-
[email protected] # https://github.com/stylelint/stylelint-config-standard/releases/latest
100
161
101
162
- repo : https://github.com/pre-commit/pygrep-hooks
102
163
rev : v1.10.0
103
164
hooks :
104
165
- id : python-check-blanket-noqa # Enforce that noqa annotations always occur with specific codes. Sample annotations: # noqa: F401, # noqa: F401,W203
166
+ name : Check for blanket noqa
167
+ description : " Check for blanket noqa annotations."
168
+
105
169
- id : python-check-blanket-type-ignore # Enforce that # type: ignore annotations always occur with specific codes. Sample annotations: # type: ignore[attr-defined], # type: ignore[attr-defined, name-defined]
170
+ name : Check for blanket type ignore
171
+ description : " Check for blanket type ignore annotations."
172
+
106
173
- id : python-check-mock-methods # Prevent common mistakes of assert mck.not_called(), assert mck.called_once_with(...) and mck.assert_called
174
+ name : Check for mock methods
175
+ description : " Check for common mistakes of mock methods."
176
+
107
177
- id : python-no-eval # A quick check for the eval() built-in function
178
+ name : Check for eval
179
+ description : " Check for the eval() built-in function."
180
+
108
181
- id : python-no-log-warn # A quick check for the deprecated .warn() method of python loggers
182
+ name : Check for log warn
183
+ description : " Check for the deprecated .warn() method of python loggers."
184
+
109
185
- id : python-use-type-annotations # Enforce that python3.6+ type annotations are used instead of type comments
186
+ name : Use type annotations
187
+ description : " Enforce that python3.6+ type annotations are used instead of type comments."
110
188
111
189
- repo : https://github.com/editorconfig-checker/editorconfig-checker.python
112
190
rev : 2.7.3
113
191
hooks :
114
192
- id : editorconfig-checker
193
+ name : EditorConfig Checker
194
+ description : " Check for compliance with the definitions in the EditorConfig file."
115
195
exclude : |
116
196
(?x)(
117
197
LICENSE|
@@ -123,56 +203,74 @@ repos:
123
203
rev : 1.15.0
124
204
hooks :
125
205
- id : django-upgrade
206
+ name : Django upgrade
207
+ description : " Upgrade Django code to a target version."
126
208
args :
127
209
- --target-version=4.0 # Minimum supported Django version for AA. Update as needed.
128
210
129
211
- repo : https://github.com/asottile/pyupgrade
130
212
rev : v3.15.0
131
213
hooks :
132
214
- id : pyupgrade
215
+ name : PyUpgrade
216
+ description : " Upgrade syntax to newer versions of Python."
133
217
args :
134
- - --py38-plus
218
+ - --py38-plus # Minimum required Python version for AA. Update as needed.
135
219
136
220
- repo : https://github.com/pycqa/flake8
137
- rev : 6.1 .0
221
+ rev : 7.0 .0
138
222
hooks :
139
223
- id : flake8
224
+ name : Flake8
225
+ description : " Check for style and complexity issues in Python code."
140
226
141
227
- repo : https://github.com/asottile/yesqa
142
228
rev : v1.5.0
143
229
hooks :
144
230
- id : yesqa
231
+ name : YesQA
232
+ description : " Check for extraneous `# noqa` comments."
145
233
146
234
- repo : https://github.com/PyCQA/isort
147
235
rev : 5.13.2
148
236
hooks :
149
237
- id : isort
238
+ name : Isort
239
+ description : " Sort imports."
150
240
151
241
- repo : https://github.com/Pierre-Sassoulas/black-disable-checker/
152
242
rev : v1.1.3
153
243
hooks :
154
244
- id : black-disable-checker
245
+ name : Black disable checker
246
+ description : " Check for black disable comments."
155
247
156
248
- repo : https://github.com/psf/black
157
- rev : 23.12 .1
249
+ rev : 24.1 .1
158
250
hooks :
159
251
- id : black
252
+ name : Black
253
+ description : " Format Python code."
160
254
args :
161
255
- --target-version=py38 # Minimum required Python version for AA. Update as needed.
162
256
163
257
- repo : https://github.com/asottile/blacken-docs
164
258
rev : 1.16.0
165
259
hooks :
166
260
- id : blacken-docs
261
+ name : Blacken docs
262
+ description : " Format Python code in documentation files."
167
263
additional_dependencies :
168
- - black==23.12 .1 # https://github.com/psf/black/releases/latest
264
+ - black==24.1 .1 # https://github.com/psf/black/releases/latest
169
265
args :
170
266
- --target-version=py38 # Minimum required Python version for AA. Update as needed.
171
267
172
268
- repo : https://github.com/executablebooks/mdformat
173
269
rev : 0.7.17
174
270
hooks :
175
271
- id : mdformat
272
+ name : Mdformat
273
+ description : " Format Markdown files."
176
274
exclude : |
177
275
(?x)(
178
276
.github/
@@ -187,24 +285,32 @@ repos:
187
285
rev : 1.3.1
188
286
hooks :
189
287
- id : tox-ini-fmt
288
+ name : tox.ini formatter
289
+ description : " Format the tox.ini file."
190
290
191
291
- repo : https://github.com/tox-dev/pyproject-fmt
192
- rev : 1.5.3
292
+ rev : 1.7.0
193
293
hooks :
194
294
- id : pyproject-fmt
295
+ name : pyproject.toml formatter
296
+ description : " Format the pyproject.toml file."
195
297
args :
196
298
- --indent=4
197
299
additional_dependencies :
198
300
- tox==4.11.4 # https://github.com/tox-dev/tox/releases/latest
199
301
200
302
- repo : https://github.com/abravalheri/validate-pyproject
201
- rev : v0.15
303
+ rev : v0.16
202
304
hooks :
203
305
- id : validate-pyproject
306
+ name : Validate pyproject.toml
307
+ description : " Validate the pyproject.toml file."
204
308
205
309
- repo : https://github.com/pylint-dev/pylint
206
310
rev : v3.0.3
207
311
hooks :
208
312
- id : pylint
313
+ name : Pylint
314
+ description : " Check for errors and code smells in Python code."
209
315
args :
210
316
- --py-version=3.8 # Minimum required Python version for AA. Update as needed.
0 commit comments