@@ -18,15 +18,15 @@ repos:
18
18
types : [text]
19
19
args : [--append-config=flake8/cython-template.cfg]
20
20
- repo : https://github.com/PyCQA/isort
21
- rev : 5.6.3
21
+ rev : 5.6.4
22
22
hooks :
23
23
- id : isort
24
24
name : isort (python)
25
25
- id : isort
26
26
name : isort (cython)
27
27
types : [cython]
28
28
- repo : https://github.com/asottile/pyupgrade
29
- rev : v2.7.2
29
+ rev : v2.7.3
30
30
hooks :
31
31
- id : pyupgrade
32
32
args : [--py37-plus]
@@ -66,9 +66,17 @@ repos:
66
66
from\ pandas\.core\ import\ common|
67
67
68
68
# Check for imports from collections.abc instead of `from collections import abc`
69
- from\ collections\.abc\ import|
69
+ from\ collections\.abc\ import
70
70
71
- from\ numpy\ import\ nan
71
+ - id : non-standard-numpy.random-related-imports
72
+ name : Check for non-standard numpy.random-related imports excluding pandas/_testing.py
73
+ language : pygrep
74
+ exclude : pandas/_testing.py
75
+ entry : |
76
+ (?x)
77
+ # Check for imports from np.random.<method> instead of `from numpy import random` or `from numpy.random import <method>`
78
+ from\ numpy\ import\ random|
79
+ from\ numpy.random\ import
72
80
types : [python]
73
81
- id : non-standard-imports-in-tests
74
82
name : Check for non-standard imports in test suite
@@ -104,19 +112,55 @@ repos:
104
112
language : python
105
113
entry : python scripts/validate_unwanted_patterns.py --validation-type="private_import_across_module"
106
114
types : [python]
107
- exclude : ^(asv_bench|pandas/_vendored|pandas/ tests|doc)/
115
+ exclude : ^(asv_bench|pandas/tests|doc)/
108
116
- id : unwanted-patterns-private-function-across-module
109
117
name : Check for use of private functions across modules
110
118
language : python
111
119
entry : python scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module"
112
120
types : [python]
113
- exclude : ^(asv_bench|pandas/_vendored|pandas/tests|doc)/
121
+ exclude : ^(asv_bench|pandas/tests|doc)/
122
+ - id : inconsistent-namespace-usage
123
+ name : ' Check for inconsistent use of pandas namespace in tests'
124
+ entry : python scripts/check_for_inconsistent_pandas_namespace.py
125
+ language : python
126
+ types : [python]
127
+ files : ^pandas/tests/
128
+ - id : FrameOrSeriesUnion
129
+ name : Check for use of Union[Series, DataFrame] instead of FrameOrSeriesUnion alias
130
+ entry : Union\[.*(Series.*DataFrame|DataFrame.*Series).*\]
131
+ language : pygrep
132
+ types : [python]
133
+ exclude : ^pandas/_typing\.py$
134
+ - id : type-not-class
135
+ name : Check for use of foo.__class__ instead of type(foo)
136
+ entry : \.__class__
137
+ language : pygrep
138
+ files : \.(py|pyx)$
139
+ - id : unwanted-typing
140
+ name : Check for use of comment-based annotation syntax and missing error codes
141
+ entry : |
142
+ (?x)
143
+ \#\ type:\ (?!ignore)|
144
+ \#\ type:\s?ignore(?!\[)
145
+ language : pygrep
146
+ types : [python]
147
+ - id : no-os-remove
148
+ name : Check code for instances of os.remove
149
+ entry : os\.remove
150
+ language : pygrep
151
+ types : [python]
152
+ files : ^pandas/tests/
153
+ exclude : |
154
+ (?x)^
155
+ pandas/tests/io/excel/test_writers\.py|
156
+ pandas/tests/io/pytables/common\.py|
157
+ pandas/tests/io/pytables/test_store\.py$
114
158
- repo : https://github.com/asottile/yesqa
115
159
rev : v1.2.2
116
160
hooks :
117
161
- id : yesqa
118
162
- repo : https://github.com/pre-commit/pre-commit-hooks
119
- rev : v3.2 .0
163
+ rev : v3.3 .0
120
164
hooks :
121
165
- id : end-of-file-fixer
122
166
exclude : ^LICENSES/|\.(html|csv|txt|svg|py)$
0 commit comments