Skip to content

Commit 228aa76

Browse files
committed
add hook for disallowing bare pytest raises
1 parent f58d815 commit 228aa76

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.pre-commit-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ repos:
121121
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module"
122122
types: [python]
123123
exclude: ^(asv_bench|pandas/tests|doc)/
124+
- id: unwanted-patterns-bare-pytest-raises
125+
name: Check for use of bare pytest raises
126+
language: python
127+
entry: python scripts/validate_unwanted_patterns.py --validation-type="bare_pytest_raises"
128+
types: [python]
129+
files: ^pandas/tests/
130+
exclude: ^pandas/tests/(arrays|computation|dtypes|extension|indexes|indexing|io|libs|reductions|resample|reshape|series|window)/
124131
- id: inconsistent-namespace-usage
125132
name: 'Check for inconsistent use of pandas namespace in tests'
126133
entry: python scripts/check_for_inconsistent_pandas_namespace.py

0 commit comments

Comments
 (0)