1
1
minimum_pre_commit_version : 2.15.0
2
2
exclude : ^LICENSES/|\.(html|csv|svg)$
3
- # reserve "manual" for mypy and pyright
4
- default_stages : [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
3
+ # reserve "manual" for relatively slow hooks which we still want to run in CI
4
+ default_stages : [
5
+ commit,
6
+ merge-commit,
7
+ push,
8
+ prepare-commit-msg,
9
+ commit-msg,
10
+ post-checkout,
11
+ post-commit,
12
+ post-merge,
13
+ post-rewrite
14
+ ]
5
15
ci :
6
16
autofix_prs : false
7
17
repos :
24
34
types_or : [python, rst, markdown]
25
35
additional_dependencies : [tomli]
26
36
- repo : https://github.com/MarcoGorelli/cython-lint
27
- rev : v0.9 .1
37
+ rev : v0.10 .1
28
38
hooks :
29
39
- id : cython-lint
30
40
- id : double-quote-cython-strings
@@ -34,9 +44,11 @@ repos:
34
44
- id : debug-statements
35
45
- id : end-of-file-fixer
36
46
exclude : \.txt$
37
- stages : [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
47
+ stages : [commit, merge-commit, push, prepare-commit-msg, commit-msg,
48
+ post-checkout, post-commit, post-merge, post-rewrite]
38
49
- id : trailing-whitespace
39
- stages : [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
50
+ stages : [commit, merge-commit, push, prepare-commit-msg, commit-msg,
51
+ post-checkout, post-commit, post-merge, post-rewrite]
40
52
- repo : https://github.com/cpplint/cpplint
41
53
rev : 1.6.1
42
54
hooks :
@@ -46,7 +58,14 @@ repos:
46
58
# this particular codebase (e.g. src/headers, src/klib). However,
47
59
# we can lint all header files since they aren't "generated" like C files are.
48
60
exclude : ^pandas/_libs/src/(klib|headers)/
49
- args : [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
61
+ args : [
62
+ --quiet,
63
+ ' --extensions=c,h' ,
64
+ ' --headers=h' ,
65
+ --recursive,
66
+ --linelength=88,
67
+ ' --filter=-readability/casting,-runtime/int,-build/include_subdir,-readability/fn_size'
68
+ ]
50
69
- repo : https://github.com/PyCQA/flake8
51
70
rev : 6.0.0
52
71
hooks :
@@ -58,12 +77,12 @@ repos:
58
77
- flake8-bugbear==22.7.1
59
78
- pandas-dev-flaker==0.5.0
60
79
- repo : https://github.com/pycqa/pylint
61
- rev : v2.15.6
80
+ rev : v2.15.9
62
81
hooks :
63
82
- id : pylint
64
83
stages : [manual]
65
84
- repo : https://github.com/pycqa/pylint
66
- rev : v2.15.6
85
+ rev : v2.15.9
67
86
hooks :
68
87
- id : pylint
69
88
alias : redefined-outer-name
@@ -76,15 +95,14 @@ repos:
76
95
|^pandas/util/_test_decorators\.py # keep excluded
77
96
|^pandas/_version\.py # keep excluded
78
97
|^pandas/conftest\.py # keep excluded
79
- |^pandas/core/generic\.py
80
98
args : [--disable=all, --enable=redefined-outer-name]
81
99
stages : [manual]
82
100
- repo : https://github.com/PyCQA/isort
83
- rev : 5.10.1
101
+ rev : 5.11.4
84
102
hooks :
85
103
- id : isort
86
104
- repo : https://github.com/asottile/pyupgrade
87
- rev : v3.2.2
105
+ rev : v3.3.1
88
106
hooks :
89
107
- id : pyupgrade
90
108
args : [--py38-plus]
@@ -107,6 +125,7 @@ repos:
107
125
hooks :
108
126
- id : yesqa
109
127
additional_dependencies : *flake8_dependencies
128
+ stages : [manual]
110
129
- repo : local
111
130
hooks :
112
131
# NOTE: we make `black` a local hook because if it's installed from
@@ -214,7 +233,6 @@ repos:
214
233
exclude : ^pandas/tests/extension/base/base\.py
215
234
- id : pip-to-conda
216
235
name : Generate pip dependency from conda
217
- description : This hook checks if the conda environment.yml and requirements-dev.txt are equal
218
236
language : python
219
237
entry : python scripts/generate_pip_deps_from_conda.py
220
238
files : ^(environment.yml|requirements-dev.txt)$
@@ -311,6 +329,16 @@ repos:
311
329
files : ^pandas
312
330
exclude : ^(pandas/tests|pandas/_version.py|pandas/io/clipboard)
313
331
language : python
332
+ stages : [manual]
314
333
additional_dependencies :
315
334
- autotyping==22.9.0
316
335
- libcst==0.4.7
336
+ - id : check-test-naming
337
+ name : check that test names start with 'test'
338
+ entry : python -m scripts.check_test_naming
339
+ types : [python]
340
+ files : ^pandas/tests
341
+ language : python
342
+ exclude : |
343
+ (?x)
344
+ ^pandas/tests/generic/test_generic.py # GH50380
0 commit comments