diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d78c2bacc4e44..2dade8afbf91f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,5 @@ minimum_pre_commit_version: 2.9.2 +exclude: ^LICENSES/|\.(html|csv|svg)$ repos: - repo: https://github.com/python/black rev: 20.8b1 @@ -121,6 +122,13 @@ repos: entry: python scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module" types: [python] exclude: ^(asv_bench|pandas/tests|doc)/ + - id: unwanted-patterns-bare-pytest-raises + name: Check for use of bare pytest raises + language: python + entry: python scripts/validate_unwanted_patterns.py --validation-type="bare_pytest_raises" + types: [python] + files: ^pandas/tests/ + exclude: ^pandas/tests/(computation|extension|io)/ - id: inconsistent-namespace-usage name: 'Check for inconsistent use of pandas namespace in tests' entry: python scripts/check_for_inconsistent_pandas_namespace.py @@ -137,7 +145,7 @@ repos: name: Check for use of foo.__class__ instead of type(foo) entry: \.__class__ language: pygrep - files: \.(py|pyx)$ + types_or: [python, cython] - id: unwanted-typing name: Check for use of comment-based annotation syntax and missing error codes entry: | @@ -165,9 +173,8 @@ repos: rev: v3.4.0 hooks: - id: end-of-file-fixer - exclude: ^LICENSES/|\.(html|csv|txt|svg|py)$ + exclude: \.txt$ - id: trailing-whitespace - exclude: \.(html|svg)$ - repo: https://github.com/codespell-project/codespell rev: v2.0.0 hooks: