From e7b89122f057fdf985abb86e0a254d149b4f5120 Mon Sep 17 00:00:00 2001 From: Anh Trinh Date: Tue, 13 Feb 2024 17:14:31 +0700 Subject: [PATCH] Remove redundant rules --- .pre-commit-config.yaml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 876d86a68f0db..91ca35ce33c49 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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/