Skip to content

chore(lint): pin ruff 0.15.20, fix pre-existing violations from 0.16.0 upgrade - #174

Merged
JesuFemi-O merged 2 commits into
v0.1.11from
chore/ruff-pin
Aug 2, 2026
Merged

chore(lint): pin ruff 0.15.20, fix pre-existing violations from 0.16.0 upgrade#174
JesuFemi-O merged 2 commits into
v0.1.11from
chore/ruff-pin

Conversation

@JesuFemi-O

@JesuFemi-O JesuFemi-O commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pins ruff==0.15.20 in dev extras so CI and local dev always use the same version
  • Switches CI from uvx ruff check (always pulls latest) to uv run ruff check
  • Auto-fixes 194 pre-existing violations introduced by ruff 0.16.0's new rules
  • Adds E402 ignore for src/tycoon/commands/init.py (import order side-effect of the auto-fix)

Why

CI was using uvx ruff which downloaded ruff 0.16.0 at run time while the project venv had 0.15.20. The version drift caused 299 violations across 54 files that didn't exist locally.

Files to focus on

Base of the M2 stack — #169 targets this branch.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

… from ruff 0.16.0 upgrade

CI used `uvx ruff` (always latest) while the project had no pinned version,
causing CI to fail whenever ruff shipped new default rules. Fix:
- Add ruff==0.15.20 to dev extras and update CI to use `uv run ruff`
- Auto-fix 194 import-sort and type-annotation violations flagged by 0.16.0
- Add E402 ignore for init.py re-export block (backwards-compat pattern)
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@db-tycoon-stephen

Copy link
Copy Markdown
Contributor

Pin and the uvxuv run switch both look right, and this fixes the real problem of CI drifting from local.

Two changes worth making before this goes into v0.1.11:

Add ruff format --check to the ruff job. CI only runs ruff check, so formatting isn't enforced. src/tycoon/project.py was missed by the format pass here, and the churn is now showing up inside #169 and #171#169 is +91/-39 for what's really about 50 lines of new code, which makes the feature diffs harder to read. Enforcing format in CI stops that recurring.

Use uv sync --group dev instead of uv sync --all-extras. ruff is in [dependency-groups], not [project.optional-dependencies], so --all-extras isn't what's installing it — uv's default dev group is. It works, but by accident, and --all-extras pulls every optional extra the project has. Being explicit here means the step keeps working if the default-group behaviour ever changes.

@db-tycoon-stephen db-tycoon-stephen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude caught some issues. Can you review them before merging?

@db-tycoon-stephen db-tycoon-stephen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes on the two items in the comment above: add ruff format --check to the ruff job so formatting drift stops leaking into feature PRs, and switch uv sync --all-extras to uv sync --group dev so the step names the group that actually provides ruff.

The pin itself and the uvxuv run switch are right — this is the fix I want, just want those two tightened before it lands in v0.1.11.

… dev

Add ruff format --check to the lint job so formatting drift stops leaking
into feature PRs. Switch uv sync --all-extras to uv sync --group dev since
ruff lives in [dependency-groups].dev, not an optional extra. Run the full
format pass to clear all pre-existing formatting violations.

@db-tycoon-stephen db-tycoon-stephen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both addressed — uv sync --group dev with a comment explaining why, and a ruff format --check step. Green across the board. Good to go into v0.1.11.

@JesuFemi-O
JesuFemi-O merged commit 5787453 into v0.1.11 Aug 2, 2026
9 checks passed
db-tycoon-stephen added a commit that referenced this pull request Aug 5, 2026
- pyproject + __init__ to 0.1.11, lockfile refreshed
- CHANGELOG [0.1.11] entry: M2 schema work (#83/PR #190), ruff pin +
  format gate (PR #174), release-time dependency review (PR #180), and
  the four T2-4 review follow-ups closed on this branch (#185-#188)
- docs/releases/v0.1.11.md + mkdocs nav entry

Release date matches the planned 2026-08-07; adjust before tagging if
the train slips.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants