-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathruff.toml
More file actions
41 lines (38 loc) · 1.7 KB
/
Copy pathruff.toml
File metadata and controls
41 lines (38 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Shared Ruff configuration for every Python file in this repository.
# Ruff (check + format) replaces the previous black + [tool.isort] + ancient
# ruff 0.0.239 combination.
target-version = "py310"
# The benchmark notebooks were never covered by the old `black` (which was
# configured for `types: [python]`) or by ruff 0.0.239 (no notebook support),
# and they are scratch/benchmarking material. Keep them out of scope.
extend-exclude = ["*.ipynb"]
[lint]
# The #67 tooling swap deliberately kept the historical `["E", "F", "I"]` so it
# would not turn into a codebase-wide lint sweep. #83 widens it; the sweep is
# its own commit.
#
# Not selected, on purpose:
# * `PT` -- pytest-raises-too-broad wants an added `match=` on every
# `pytest.raises`, which is a test-content change, not a lint fix.
# * `FURB` -- preview-adjacent and mostly stylistic (`Decimal("1")` vs
# `Decimal(1)`); churn without a correctness payoff here.
# * `ANN`/`D` -- this repo does not annotate or docstring its test helpers,
# and forcing it would swamp any real finding.
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade -- the floor is Python 3.10
"B", # flake8-bugbear
"SIM", # flake8-simplify
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"PERF", # perflint
"RUF", # ruff-specific
]
[lint.isort]
# `target-version = "py310"` is the *packages'* floor, and it makes ruff classify
# `tomllib` (stdlib since 3.11) as a third-party import. The helpers in `scripts/`
# are dev tooling that runs under CI's `python3`, not under that floor.
extra-standard-library = ["tomllib"]