Skip to content

Commit 1ba8c6f

Browse files
Pin ruff lint rule selection explicitly
ruff.toml documented a rule set (F + E4/E7/E9) but never declared select, so it inherited Ruff's implicit defaults. Those widened in 0.16 to include isort and pyupgrade, so CI (latest ruff) failed on code that passed locally (0.15.18). Declaring select makes the lint result identical across versions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 2e6ff93 commit 1ba8c6f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ruff.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Ruff configuration — STR Comping Agent
2-
# Uses Ruff's default lint rule set (pyflakes F + essential pycodestyle E4/E7/E9).
32
line-length = 100
43
target-version = "py310"
54

@@ -10,6 +9,14 @@ extend-exclude = [
109
"_pre-sync-backup-*",
1110
]
1211

12+
[lint]
13+
# Pyflakes (F) + the essential pycodestyle checks (E4 imports, E7 statements,
14+
# E9 syntax/IO errors). Declared explicitly rather than relying on Ruff's
15+
# implicit defaults: those defaults widen between releases (0.16 added isort
16+
# and pyupgrade), which turns a routine `pip install ruff` into a lint failure
17+
# on unchanged code. Add rules here deliberately, not by upgrade.
18+
select = ["E4", "E7", "E9", "F"]
19+
1320
[lint.per-file-ignores]
1421
# Tests insert the project root onto sys.path before importing local modules,
1522
# so their imports intentionally follow a non-import statement (E402).

0 commit comments

Comments
 (0)