Skip to content

CP-3473: adopt standardized ruff rule set + pyrefly ~=1.1 in squawk-pre-commit#9

Merged
stephen-kintsugi merged 3 commits into
mainfrom
task/CP-3473/squawk-ruff-pyrefly
Jul 24, 2026
Merged

CP-3473: adopt standardized ruff rule set + pyrefly ~=1.1 in squawk-pre-commit#9
stephen-kintsugi merged 3 commits into
mainfrom
task/CP-3473/squawk-ruff-pyrefly

Conversation

@stephen-kintsugi

@stephen-kintsugi stephen-kintsugi commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adopt the standardized CP ruff lint rule set: extend-select = ["I", "F", "UP", "B", "SIM", "C4"] (was ["I", "F"]), matching kintsugi-platform, kintsugi-rules, and kintsugi-product-classification.
  • Pin the ruff dev-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 at v0.13.0. The hook rev is unchanged.
  • Bump pyrefly dev-dep ~=1.0.0 -> ~=1.1 and the pyrefly-pre-commit hook rev 0.53.0 -> 1.1.1.
  • One code fix from the new rules: B904 on the _SquawkNotFound re-raise in squawk_alembic/hook.py, now raise _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 check and ruff format clean on ruff 0.13.3.
  • pyrefly check clean on 1.1.1 (0 errors).
  • Full suite green: 49 passed.
  • Full pre-commit run --all-files gate passes; ruff-format confirmed 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-select now 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.lock and package version 0.3.4 reflect those bumps.

The only application code change is a B904 fix in squawk_alembic/hook.py: missing squawk binary now raises _SquawkNotFound with from None so the FileNotFoundError chain 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.

stephen-kintsugi and others added 3 commits July 24, 2026 15:35
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>
@stephen-kintsugi
stephen-kintsugi merged commit e1d40ca into main Jul 24, 2026
4 checks passed
@stephen-kintsugi
stephen-kintsugi deleted the task/CP-3473/squawk-ruff-pyrefly branch July 24, 2026 21:14
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