Skip to content

Commit

Permalink
Remove redundant rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tqa236 committed Feb 13, 2024
1 parent ad0f549 commit e7b8912
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,39 +208,22 @@ repos:
language: pygrep
entry: |
(?x)
# pytest.xfail instead of pytest.mark.xfail
pytest\.xfail
# imports from pandas._testing instead of `import pandas._testing as tm`
|from\ pandas\._testing\ import
from\ pandas\._testing\ import
|from\ pandas\ import\ _testing\ as\ tm
# No direct imports from conftest
|conftest\ import
|import\ conftest
# pandas.testing instead of tm
|pd\.testing\.
# pd.api.types instead of from pandas.api.types import ...
|(pd|pandas)\.api\.types\.
# np.testing, np.array_equal
|(numpy|np)(\.testing|\.array_equal)
# unittest.mock (use pytest builtin monkeypatch fixture instead)
|(unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)
# np.array_equal
|(numpy|np)\.array_equal
# pytest raises without context
|\s\ pytest.raises
# TODO
# pytest.warns (use tm.assert_produces_warning instead)
# |pytest\.warns
# os.remove
|os\.remove
# Unseeded numpy default_rng
|default_rng\(\)
files: ^pandas/tests/
Expand Down

0 comments on commit e7b8912

Please sign in to comment.