Skip to content

Commit bf916d4

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

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.pre-commit-config.yaml

+8-1
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 use of 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
@@ -173,4 +180,4 @@ repos:
173180
hooks:
174181
- id: codespell
175182
types_or: [python, rst, markdown]
176-
files: ^pandas/core/
183+
files: ^(pandas/core/|doc/)

0 commit comments

Comments
 (0)