CP-3473: adopt standardized ruff rule set + pyrefly ~=1.1 in squawk-pre-commit#9
Merged
Merged
Conversation
Align squawk-pre-commit with the CP lint/type tooling standard: pin ruff to the 0.13 fleet anchor, adopt the I,F,UP,B,SIM,C4 rule set, and bump pyrefly to ~=1.1 (dev-dep and pre-commit hook rev). The only code fallout is one B904 fix on the _SquawkNotFound re-raise. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
~=1.1 is >=1.1,<2.0 and would float to 1.2 on the next lock; ~=1.1.1 caps at <1.2.0 to match how platform/rules pin pyrefly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
squawk-pre-commit CI requires a version bump on every PR (published hook package); this change ships the standardized ruff/pyrefly tooling. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
michael-kintsugi
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extend-select = ["I", "F", "UP", "B", "SIM", "C4"](was["I", "F"]), matching kintsugi-platform, kintsugi-rules, and kintsugi-product-classification.ruffdev-dep to~=0.13.3(was~=0.15.14, ahead of the fleet), matching the fleet anchor and the repo's own ruff-pre-commit hook already pinned atv0.13.0. The hook rev is unchanged.pyreflydev-dep~=1.0.0->~=1.1and thepyrefly-pre-commithook rev0.53.0->1.1.1._SquawkNotFoundre-raise insquawk_alembic/hook.py, nowraise _SquawkNotFound from None. No behavior change.Lint/type tooling only. No functional changes, no other dep bumps.
Jira
https://trykintsugi.atlassian.net/browse/CP-3473
Tests
ruff checkandruff formatclean on ruff 0.13.3.pyrefly checkclean on 1.1.1 (0 errors).pre-commit run --all-filesgate passes;ruff-formatconfirmed stable on a second run (no modifications).Document Checklist
n/a
Note
Low Risk
Dev-only lint/type pins and a non-behavioral exception chaining tweak; no runtime or security-sensitive logic changes.
Overview
Aligns squawk-alembic dev tooling with the CP fleet: ruff’s
extend-selectnow includes UP, B, SIM, and C4 (not just import/sort and pyflakes), the ruff dev dependency is pinned to ~=0.13.3 (down from 0.15.x to match other repos and the existing ruff-pre-commit hook), and pyrefly moves to ~=1.1.1 with the pyrefly-pre-commit hook rev updated to 1.1.1.poetry.lockand package version 0.3.4 reflect those bumps.The only application code change is a B904 fix in
squawk_alembic/hook.py: missingsquawkbinary now raises_SquawkNotFoundwithfrom Noneso theFileNotFoundErrorchain is suppressed; user-facing behavior is unchanged.Reviewed by Cursor Bugbot for commit 67458a4. Bugbot is set up for automated code reviews on this repo. Configure here.