Skip to content

Pin ruff lint rules to the current rule set - #15

Merged
bethvourc merged 1 commit into
mainfrom
chore/pin-ruff-rules
Sep 22, 2026
Merged

bethvourc merged 1 commit into
mainfrom
chore/pin-ruff-rules

Conversation

@bethvourc

Copy link
Copy Markdown
Owner

Summary

Unblocks #13 (Dependabot Python updates), which fails the Lint step.

The project had no [tool.ruff] config, so it relied on ruff's default rules. #13 bumps ruff from 0.15.15 to 0.16.8, and 0.16 widened those defaults from E4, E7, E9, F to roughly two dozen rule families (BLE, I, UP, S, RUF, SIM, …). That produced 313 findings in code the PR doesn't touch. The biggest groups are BLE001 (115, broad except Exception), I001 (68, import order), and UP017 (35).

This PR selects the ruff 0.15 defaults explicitly, so lint results no longer change when ruff is upgraded. Same approach as the SwiftFormat pin in #11. Adopting stricter rules can be its own PR together with the fixes. Many of the BLE001 catches look intentional, since the agent shouldn't crash, so each one needs a judgment call.

Testing

  • ruff check src tests passes with ruff 0.15.15 (current lock) and 0.16.8 (Dependabot's version).
  • pytest -q: 278 passed. uv lock --check is clean, and the lockfile is unchanged.
  • Bump the python group across 1 directory with 10 updates #13's branch, checked out locally, passes all 278 tests on the upgraded packages, including openai 2.x to 3.16.2.

After merging

Comment @dependabot rebase on #13 so it rebuilds on top of this, and CI should pass.

🤖 Generated with Claude Code

The project had no ruff config, so it linted with ruff's default rules.
Ruff 0.16 widened those defaults from E4/E7/E9/F to roughly two dozen
rule families, which is why Dependabot's upgrade (#13) fails CI with 313
findings in unchanged code.

Select the ruff 0.15 defaults explicitly so the lint result no longer
depends on the installed ruff version. Adopting more rules can happen
separately, together with the fixes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bethvourc
bethvourc merged commit 96041ce into main Sep 22, 2026
3 checks passed
@bethvourc
bethvourc deleted the chore/pin-ruff-rules branch September 22, 2026 14:39
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