Skip to content

Commit 3216308

Browse files
jbloomclaude
andauthored
pin ruff and state the lint rules explicitly (#10)
CI has been red on unchanged code. `ruff>=0.6` is unpinned, and ruff's *default* rule set widened in 0.16, so CI (which installed 0.16.4) reported 22 findings across 12 files while a local `.venv` on 0.15.12 reported none. Declare `[tool.ruff.lint] select` as ruff's pre-0.16 defaults -- the rules this project has actually been checked against -- so the selection is a project decision rather than whatever the installed ruff happens to default to, and pin ruff to `>=0.16,<0.17` so local and CI agree on the version. No source changes: main is clean under 0.16.4 once the selection is stated. Adopting the wider rule set is a separate question, left for its own change. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 8ec3375 commit 3216308

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Pin `ruff` to `>=0.16,<0.17` and state the lint rules explicitly with
13+
`[tool.ruff.lint] select`. Ruff's *default* rule set widened in 0.16, which
14+
turned CI red on unchanged code; the selection is now a project decision
15+
rather than whatever the installed ruff defaults to. Development-only, no
16+
effect on the package.
17+
1018
## [0.3.0] - 2026-05-19
1119

1220
### Added

‎pyproject.toml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Issues = "https://github.com/jbloomlab/tree-annotated-plot/issues"
3636
[project.optional-dependencies]
3737
dev = [
3838
"pytest>=8",
39-
"ruff>=0.6",
39+
"ruff>=0.16,<0.17",
4040
"black>=24",
4141
]
4242
docs = [
@@ -58,3 +58,10 @@ target-version = ["py311"]
5858

5959
[tool.ruff]
6060
target-version = "py311"
61+
62+
[tool.ruff.lint]
63+
# Ruff's default rule set is not stable across releases -- 0.16 broadened it,
64+
# which turned CI red on unchanged code. State the rules we lint against so a
65+
# ruff upgrade changes them only when we say so. These are ruff's pre-0.16
66+
# defaults, which is what this project has been checked against all along.
67+
select = ["E4", "E7", "E9", "F"]

0 commit comments

Comments
 (0)