@@ -50,10 +50,6 @@ repos:
50
50
rev : 5.7.0
51
51
hooks :
52
52
- id : isort
53
- - repo : https://github.com/MarcoGorelli/no-string-hints
54
- rev : v0.1.7
55
- hooks :
56
- - id : no-string-hints
57
53
- repo : https://github.com/asottile/pyupgrade
58
54
rev : v2.10.0
59
55
hooks :
@@ -111,12 +107,6 @@ repos:
111
107
pandas/tests/io/excel/test_writers\.py
112
108
|pandas/tests/io/pytables/common\.py
113
109
|pandas/tests/io/pytables/test_store\.py$
114
- - id : no-pandas-api-types
115
- name : Check code for instances of pd.api.types
116
- entry : (pd|pandas)\.api\.types\.
117
- language : pygrep
118
- types : [python]
119
- files : ^pandas/tests/
120
110
- id : non-standard-imports
121
111
name : Check for non-standard imports
122
112
language : pygrep
@@ -128,6 +118,11 @@ repos:
128
118
129
119
# Check for imports from collections.abc instead of `from collections import abc`
130
120
|from\ collections\.abc\ import
121
+
122
+ # Numpy
123
+ |from\ numpy\ import\ random
124
+ |from\ numpy\.random\ import
125
+ types : [python]
131
126
- id : non-standard-imports-in-tests
132
127
name : Check for non-standard imports in test suite
133
128
language : pygrep
@@ -143,26 +138,17 @@ repos:
143
138
144
139
# Check for use of pandas.testing instead of tm
145
140
|pd\.testing\.
141
+
142
+ # Check for pd.api.types instead of from pandas.api.types import ...
143
+ |(pd|pandas)\.api\.types\.
146
144
types : [python]
147
145
files : ^pandas/tests/
148
- - id : non-standard-numpy-random-related-imports
149
- name : Check for non-standard numpy.random-related imports excluding pandas/_testing.py
150
- language : pygrep
151
- exclude : pandas/_testing.py
146
+ - id : np-bool-and-np-object
147
+ name : Check for use of np.bool/np.object instead of np.bool_/np.object_
152
148
entry : |
153
149
(?x)
154
- # Check for imports from np.random.<method> instead of `from numpy import random` or `from numpy.random import <method>`
155
- from\ numpy\ import\ random
156
- |from\ numpy.random\ import
157
- types : [python]
158
- - id : np-bool
159
- name : Check for use of np.bool instead of np.bool_
160
- entry : np\.bool[^_8]
161
- language : pygrep
162
- types_or : [python, cython, rst]
163
- - id : np-object
164
- name : Check for use of np.object instead of np.object_
165
- entry : np\.object[^_8]
150
+ np\.bool[^_8]
151
+ |np\.object[^_8]
166
152
language : pygrep
167
153
types_or : [python, cython, rst]
168
154
- id : pip-to-conda
0 commit comments