Skip to content

fix: upgrade ruff to 0.17 - #289

Merged
hcallahan-lowrisc merged 1 commit into
lowRISC:masterfrom
hcallahan-lowrisc:deps/ruff-0.17
Nov 12, 2026
Merged

hcallahan-lowrisc merged 1 commit into
lowRISC:masterfrom
hcallahan-lowrisc:deps/ruff-0.17

Conversation

@hcallahan-lowrisc

@hcallahan-lowrisc hcallahan-lowrisc commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

#288 held ruff at 0.15.15 because 0.17 fails the CI lint job (as seen on #277). This upgrades ruff to 0.17.4 (uv lock -P ruff, no other packages change) and fixes the three rules that fail:

  • CPY001 (missing-copyright-notice) is now stable, so the ALL selection picks it up. Its default notice-rgx needs a year after "Copyright", which our Copyright lowRISC contributors headers don't have, so it flagged all 132 files. Set notice-rgx to match our header in both pyproject.toml and ruff-ci.toml; a file with no header is still flagged.
  • ICN001 now wants import datetime as dt; done in the three modules that import it.
  • ISC004 (new) flags unparenthesised implicit string concatenation in collection literals, which is often a missing comma. All four hits are intentional, so they're parenthesised.

Testing

  • ruff format --check and ruff check --config=ruff-ci.toml pass with 0.17.4.
  • pytest passes locally on Python 3.13 (499 tests).
  • lint_commits.py passes.

This PR includes AI-assisted content generated with Claude Code. All changes have been reviewed and are the responsibility of the listed author(s).

Ruff 0.17 makes three rules fail the CI lint job:

- CPY001 (missing-copyright-notice) is now a stable rule, so the
  "ALL" selection picks it up. Its default notice-rgx needs a year after
  "Copyright", which our "Copyright lowRISC contributors" headers don't
  have, so it flagged every file. Set notice-rgx to match our header in
  both the full and CI configurations; a file with no header is still
  flagged.
- ICN001 now wants datetime imported as dt. Do so in the three modules
  that import it.
- ISC004 is a new rule that flags unparenthesised implicit string
  concatenation in a collection literal, which is often a missing comma.
  The four hits are intentional concatenations; parenthesise them.

AI-assisted (Claude Code) — reviewed and approved by author

Co-Authored-By: Claude <claude@anthropic.com>
Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
@hcallahan-lowrisc
hcallahan-lowrisc added this pull request to the merge queue Nov 12, 2026
Merged via the queue into lowRISC:master with commit 3bbfb68 Nov 12, 2026
6 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