Skip to content

Commit e847b2a

Browse files
committed
pre-commit: replace debug-statements hook with ruff
Ruff supports this functionality so we can use it.
1 parent 85bc9ca commit e847b2a

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ repos:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
1313
- id: check-yaml
14-
- id: debug-statements
15-
exclude: _pytest/(debugging|hookspec).py
16-
language_version: python3
1714
- repo: https://github.com/adamchainz/blacken-docs
1815
rev: 1.16.0
1916
hooks:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ select = [
107107
"PLE", # pylint error
108108
"PLW", # pylint warning
109109
"PLR1714", # Consider merging multiple comparisons
110+
"T100", # flake8-debugger
110111
]
111112
ignore = [
112113
# bugbear ignore

src/_pytest/debugging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# mypy: allow-untyped-defs
2+
# ruff: noqa: T100
23
"""Interactive debugging with PDB, the Python Debugger."""
34

45
import argparse

src/_pytest/hookspec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# mypy: allow-untyped-defs
2+
# ruff: noqa: T100
23
"""Hook specifications for pytest plugins which are invoked by pytest itself
34
and by builtin plugins."""
45

0 commit comments

Comments
 (0)