@@ -17,21 +17,19 @@ repos:
17
17
entry : python scripts/run_vulture.py
18
18
pass_filenames : true
19
19
require_serial : false
20
- - repo : https://github.com/python/black
21
- rev : 22.10.0
22
- hooks :
23
- - id : black
24
20
- repo : https://github.com/codespell-project/codespell
25
21
rev : v2.2.2
26
22
hooks :
27
23
- id : codespell
28
24
types_or : [python, rst, markdown]
25
+ additional_dependencies : [tomli]
29
26
- repo : https://github.com/MarcoGorelli/cython-lint
30
- rev : v0.2 .1
27
+ rev : v0.9 .1
31
28
hooks :
32
29
- id : cython-lint
30
+ - id : double-quote-cython-strings
33
31
- repo : https://github.com/pre-commit/pre-commit-hooks
34
- rev : v4.3 .0
32
+ rev : v4.4 .0
35
33
hooks :
36
34
- id : debug-statements
37
35
- id : end-of-file-fixer
@@ -50,26 +48,43 @@ repos:
50
48
exclude : ^pandas/_libs/src/(klib|headers)/
51
49
args : [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
52
50
- repo : https://github.com/PyCQA/flake8
53
- rev : 5 .0.4
51
+ rev : 6 .0.0
54
52
hooks :
55
53
- id : flake8
56
54
# Need to patch os.remove rule in pandas-dev-flaker
57
55
exclude : ^ci/fix_wheels.py
58
56
additional_dependencies : &flake8_dependencies
59
- - flake8==5 .0.4
57
+ - flake8==6 .0.0
60
58
- flake8-bugbear==22.7.1
61
59
- pandas-dev-flaker==0.5.0
62
60
- repo : https://github.com/pycqa/pylint
63
- rev : v2.15.5
61
+ rev : v2.15.6
62
+ hooks :
63
+ - id : pylint
64
+ stages : [manual]
65
+ - repo : https://github.com/pycqa/pylint
66
+ rev : v2.15.6
64
67
hooks :
65
68
- id : pylint
69
+ alias : redefined-outer-name
70
+ name : Redefining name from outer scope
71
+ files : ^pandas/
72
+ exclude : |
73
+ (?x)
74
+ ^pandas/tests # keep excluded
75
+ |/_testing/ # keep excluded
76
+ |^pandas/util/_test_decorators\.py # keep excluded
77
+ |^pandas/_version\.py # keep excluded
78
+ |^pandas/conftest\.py # keep excluded
79
+ |^pandas/core/generic\.py
80
+ args : [--disable=all, --enable=redefined-outer-name]
66
81
stages : [manual]
67
82
- repo : https://github.com/PyCQA/isort
68
83
rev : 5.10.1
69
84
hooks :
70
85
- id : isort
71
86
- repo : https://github.com/asottile/pyupgrade
72
- rev : v3.2.0
87
+ rev : v3.2.2
73
88
hooks :
74
89
- id : pyupgrade
75
90
args : [--py38-plus]
@@ -94,6 +109,16 @@ repos:
94
109
additional_dependencies : *flake8_dependencies
95
110
- repo : local
96
111
hooks :
112
+ # NOTE: we make `black` a local hook because if it's installed from
113
+ # PyPI (rather than from source) then it'll run twice as fast thanks to mypyc
114
+ - id : black
115
+ name : black
116
+ description : " Black: The uncompromising Python code formatter"
117
+ entry : black
118
+ language : python
119
+ require_serial : true
120
+ types_or : [python, pyi]
121
+ additional_dependencies : [black==22.10.0]
97
122
- id : pyright
98
123
# note: assumes python env is setup and activated
99
124
name : pyright
@@ -201,7 +226,7 @@ repos:
201
226
entry : python scripts/sync_flake8_versions.py
202
227
files : ^(\.pre-commit-config\.yaml|environment\.yml)$
203
228
pass_filenames : false
204
- additional_dependencies : [pyyaml]
229
+ additional_dependencies : [pyyaml, toml ]
205
230
- id : title-capitalization
206
231
name : Validate correct capitalization among titles in documentation
207
232
entry : python scripts/validate_rst_title_capitalization.py
@@ -250,6 +275,7 @@ repos:
250
275
entry : python scripts/validate_min_versions_in_sync.py
251
276
language : python
252
277
files : ^(ci/deps/actions-.*-minimum_versions\.yaml|pandas/compat/_optional\.py)$
278
+ additional_dependencies : [tomli]
253
279
- id : validate-errors-locations
254
280
name : Validate errors locations
255
281
description : Validate errors are in appropriate locations.
@@ -287,5 +313,4 @@ repos:
287
313
language : python
288
314
additional_dependencies :
289
315
- autotyping==22.9.0
290
- - black==22.6.0
291
316
- libcst==0.4.7
0 commit comments