@@ -17,21 +17,18 @@ repos:
1717 entry : python scripts/run_vulture.py
1818 pass_filenames : true
1919 require_serial : false
20- - repo : https://github.com/python/black
21- rev : 22.10.0
22- hooks :
23- - id : black
2420- repo : https://github.com/codespell-project/codespell
2521 rev : v2.2.2
2622 hooks :
2723 - id : codespell
2824 types_or : [python, rst, markdown]
25+ additional_dependencies : [tomli]
2926- repo : https://github.com/MarcoGorelli/cython-lint
30- rev : v0.2 .1
27+ rev : v0.9 .1
3128 hooks :
3229 - id : cython-lint
3330- repo : https://github.com/pre-commit/pre-commit-hooks
34- rev : v4.3 .0
31+ rev : v4.4 .0
3532 hooks :
3633 - id : debug-statements
3734 - id : end-of-file-fixer
@@ -50,26 +47,43 @@ repos:
5047 exclude : ^pandas/_libs/src/(klib|headers)/
5148 args : [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
5249- repo : https://github.com/PyCQA/flake8
53- rev : 5 .0.4
50+ rev : 6 .0.0
5451 hooks :
5552 - id : flake8
5653 # Need to patch os.remove rule in pandas-dev-flaker
5754 exclude : ^ci/fix_wheels.py
5855 additional_dependencies : &flake8_dependencies
59- - flake8==5 .0.4
56+ - flake8==6 .0.0
6057 - flake8-bugbear==22.7.1
6158 - pandas-dev-flaker==0.5.0
6259- repo : https://github.com/pycqa/pylint
63- rev : v2.15.5
60+ rev : v2.15.6
61+ hooks :
62+ - id : pylint
63+ stages : [manual]
64+ - repo : https://github.com/pycqa/pylint
65+ rev : v2.15.6
6466 hooks :
6567 - id : pylint
68+ alias : redefined-outer-name
69+ name : Redefining name from outer scope
70+ files : ^pandas/
71+ exclude : |
72+ (?x)
73+ ^pandas/tests # keep excluded
74+ |/_testing/ # keep excluded
75+ |^pandas/util/_test_decorators\.py # keep excluded
76+ |^pandas/_version\.py # keep excluded
77+ |^pandas/conftest\.py # keep excluded
78+ |^pandas/core/generic\.py
79+ args : [--disable=all, --enable=redefined-outer-name]
6680 stages : [manual]
6781- repo : https://github.com/PyCQA/isort
6882 rev : 5.10.1
6983 hooks :
7084 - id : isort
7185- repo : https://github.com/asottile/pyupgrade
72- rev : v3.2.0
86+ rev : v3.2.2
7387 hooks :
7488 - id : pyupgrade
7589 args : [--py38-plus]
@@ -94,6 +108,16 @@ repos:
94108 additional_dependencies : *flake8_dependencies
95109- repo : local
96110 hooks :
111+ # NOTE: we make `black` a local hook because if it's installed from
112+ # PyPI (rather than from source) then it'll run twice as fast thanks to mypyc
113+ - id : black
114+ name : black
115+ description : " Black: The uncompromising Python code formatter"
116+ entry : black
117+ language : python
118+ require_serial : true
119+ types_or : [python, pyi]
120+ additional_dependencies : [black==22.10.0]
97121 - id : pyright
98122 # note: assumes python env is setup and activated
99123 name : pyright
@@ -201,7 +225,7 @@ repos:
201225 entry : python scripts/sync_flake8_versions.py
202226 files : ^(\.pre-commit-config\.yaml|environment\.yml)$
203227 pass_filenames : false
204- additional_dependencies : [pyyaml]
228+ additional_dependencies : [pyyaml, toml ]
205229 - id : title-capitalization
206230 name : Validate correct capitalization among titles in documentation
207231 entry : python scripts/validate_rst_title_capitalization.py
@@ -250,6 +274,7 @@ repos:
250274 entry : python scripts/validate_min_versions_in_sync.py
251275 language : python
252276 files : ^(ci/deps/actions-.*-minimum_versions\.yaml|pandas/compat/_optional\.py)$
277+ additional_dependencies : [tomli]
253278 - id : validate-errors-locations
254279 name : Validate errors locations
255280 description : Validate errors are in appropriate locations.
0 commit comments