Skip to content

chore: pin the Ruff rule set and point Dependabot at dev - #36

Merged
JasonZQH merged 1 commit into
devfrom
chore/pin-ruff-rules-and-dependabot-target
Jul 28, 2026
Merged

chore: pin the Ruff rule set and point Dependabot at dev#36
JasonZQH merged 1 commit into
devfrom
chore/pin-ruff-rules-and-dependabot-target

Conversation

@JasonZQH

Copy link
Copy Markdown
Owner

Two config gaps found while triaging the five open Dependabot PRs. Both are config-only; no source or test files change.

Pin the Ruff rule set

[tool.ruff] set only line-length and target-version, with no select. The project therefore inherited whatever Ruff's defaults happened to be, so "lint clean" changed meaning on a Ruff upgrade rather than on a decision made here. Ruff 0.16.0 widened those defaults and surfaced 84 findings across 16 rules in code nobody had touched — which is exactly why #33 is red while its guard and smoke jobs pass. Paired with the open-ended ruff>=0.5 dev pin, every Ruff release was a coin flip.

Pinning select to Ruff's classic defaults is a verified no-op today:

0.15.19 (current) 0.16.0 (what #33 installs)
before the pin All checks passed 84 errors
after the pin All checks passed All checks passed

Same command CI runs (ruff check src tests), same config. So #33 should go green on a rebase.

This deliberately does not adopt the new rules. 57 of the 84 are auto-fixable across 49 files and 27 need hand edits, several of them worth doing on their own merits (B023 loop-variable capture in tui/setup_screen.py, PLW0127 self-assignments in core/errors.py, RUF012 mutable class default in tui/shell_app.py). That belongs in its own reviewable PR, not bundled into a dependency bump.

Point Dependabot at dev

Dependabot opens PRs against the repository's default branch, which is main, while CONTRIBUTING requires PRs to be based on dev. All five open bumps target main; merging them there would land the updates on main only and leave dev's CI testing the old versions until someone back-merges.

Two caveats worth knowing:

  • Dependabot reads .github/dependabot.yml from the default branch, so this takes effect once it reaches main — i.e. at the next devmain cut.
  • It does not retarget PRs that already exist. The five open ones stay pointed at main.

🤖 Generated with Claude Code

Two config gaps that both showed up while triaging the open Dependabot PRs.

Ruff: [tool.ruff] set only line-length and target-version, so the project
inherited whatever Ruff's defaults were. 0.16.0 widened them and turned 84
findings up in code nobody had touched (PR #33 is red on exactly this).
Pinning select to Ruff's classic defaults makes "lint clean" a decision made
here rather than one made by whichever Ruff version resolved. Verified as a
no-op: `ruff check src tests` passes on both 0.15.19 and 0.16.0 with the pin,
matching what CI enforced before it. Widening the set is separate work.

Dependabot: it opens against the repository's default branch, which is main,
while CONTRIBUTING requires PRs to be based on dev. Merging those bumps put
them on main only, leaving dev's CI to keep testing the old versions.
target-branch fixes that for future runs.

Note: Dependabot reads this file from the default branch, so the change takes
effect once it reaches main. The five PRs already open stay pointed at main.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JasonZQH
JasonZQH merged commit 3faf96e into dev Jul 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant