Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Add hook for Disallow bare pytest.raises #38799

Merged
merged 5 commits into from
Jan 3, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down