Skip to content

Commit e7b8912

Browse files
committed
Remove redundant rules
1 parent ad0f549 commit e7b8912

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

.pre-commit-config.yaml

+3-20
Original file line numberDiff line numberDiff line change
@@ -208,39 +208,22 @@ repos:
208208
language: pygrep
209209
entry: |
210210
(?x)
211-
# pytest.xfail instead of pytest.mark.xfail
212-
pytest\.xfail
213-
214211
# imports from pandas._testing instead of `import pandas._testing as tm`
215-
|from\ pandas\._testing\ import
212+
from\ pandas\._testing\ import
216213
|from\ pandas\ import\ _testing\ as\ tm
217214
218-
# No direct imports from conftest
219-
|conftest\ import
220-
|import\ conftest
221-
222215
# pandas.testing instead of tm
223216
|pd\.testing\.
224217
225218
# pd.api.types instead of from pandas.api.types import ...
226219
|(pd|pandas)\.api\.types\.
227220
228-
# np.testing, np.array_equal
229-
|(numpy|np)(\.testing|\.array_equal)
230-
231-
# unittest.mock (use pytest builtin monkeypatch fixture instead)
232-
|(unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)
221+
# np.array_equal
222+
|(numpy|np)\.array_equal
233223
234224
# pytest raises without context
235225
|\s\ pytest.raises
236226
237-
# TODO
238-
# pytest.warns (use tm.assert_produces_warning instead)
239-
# |pytest\.warns
240-
241-
# os.remove
242-
|os\.remove
243-
244227
# Unseeded numpy default_rng
245228
|default_rng\(\)
246229
files: ^pandas/tests/

0 commit comments

Comments
 (0)