Repository navigation
PS-1717: bump pyrefly to 1.3.2 and type check against python 3.10 - #21
Conversation
Aligns type checking with the org Pyrefly pin and the repo Python minor used by pre-commit. The hook id pyrefly-check is replaced by pyrefly-typecheck-system so the project venv is used. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Tool: Claude Code CLI AI-Model: claude-sonnet-5-5 AI-Reasoning: medium
Ruff 0.16.0 widened its default rule set, so extend-select alone enforces different rules on different Ruff versions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Tool: Claude Code CLI AI-Model: claude-sonnet-5-5 AI-Reasoning: medium
CI requires every code-changing PR to bump the package version in pyproject.toml and __init__.py. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Tool: Claude Code CLI AI-Model: claude-sonnet-5-5 AI-Reasoning: medium
There was a problem hiding this comment.
Risk Assessment: Very Low
Assessed from the actual diff (344a11b...6f5c4d8), not the PR description:
.pre-commit-config.yaml— swaps thepyrefly-checkhook (rev 1.1.1,language: system) forpyrefly-typecheck-system(rev 0.0.1) withalways_run: true. Dev-tooling config only; no runtime library behavior changes.pyproject.toml— dev dependency bump (pyrefly ~=1.1.1→~=1.3.2), ruff lint set made explicit (extend-select→select, same rule families plus E4/E7/E9), pyreflypython-version3.12.0 → 3.13.0, package version bump to 0.3.7. None of this alters shipped code paths.squawk_alembic/__init__.py— version string only.poetry.lock— regenerated lockfile mirroring the pyproject change.
Blast radius: dev/pre-commit tooling and release metadata; reversibility is trivial (revert one commit set); no shared-resource pressure, no schema, no core logic, no import-linter changes.
Gates checked: no production code changed (test-coverage gate N/A — tooling/config only); no importlinter.toml changes; no active approval on the latest commit; codeowner review requests (mbertrand-kintsugi, michael-kintsugi) are informational routing and do not block approval.
defaults:
risk_level: Very Low
review_required: false
reviewers: []
action_taken: approved
rationale: >-
Diff is confined to pre-commit hook config, dev dependency/lockfile bumps, an explicit
ruff rule list, a pyrefly target-version change, and version-string bumps. No production
logic, schema, security boundary, or shared-resource behavior is touched, and the change
is trivially reversible.Sent by Cursor Automation: Assign PR reviewers & Assess Risk & Approve if Safe
mbertrand-kintsugi
left a comment
There was a problem hiding this comment.
The hook rev 0.0.1 is a real tag of facebook/pyrefly-pre-commit, and at that tag pyrefly-typecheck-system uses language: system, so the hook still runs the Poetry-installed pyrefly 1.3.2. Lockfile, Ruff select list and Python 3.13 target match the diff, and CI is green.
This repo is a published hook package supporting python >=3.10, so Pyrefly targets the lowest supported version to catch syntax and APIs that 3.10 consumers cannot use. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Tool: Claude Code CLI AI-Model: claude-sonnet-5-5 AI-Reasoning: medium
a9b7ea1
There was a problem hiding this comment.
Risk Assessment: Very Low (re-approved after new commit)
Re-evaluated the incremental diff since the previous approval (6f5c4d8 → a9b7ea1): a single line in pyproject.toml changing the Pyrefly type-check target from python-version = "3.13.0" to "3.10.0".
Assessed from the actual diff, not the PR description:
pyproject.toml— one-line tooling config change; Pyrefly'spython-versionis a type-checker target knob only (targeting the 3.10 floor is stricter for checking, not looser). No runtime library behavior, schema, security boundary, or shared-resource impact. Trivially reversible (revert one value).- Full PR diff remains confined to
.pre-commit-config.yaml(pre-commit hook config),pyproject.toml(dev dependency bump, explicit ruff rule list, version bump),squawk_alembic/__init__.py(version string only), and the regeneratedpoetry.lock.
Gates checked: no production code changed (test-coverage gate N/A — tooling/config only); no importlinter.toml changes; no active approval on the latest commit; codeowner review requests (mbertrand-kintsugi, michael-kintsugi) are informational routing and do not block approval.
defaults:
risk_level: Very Low
review_required: false
reviewers: []
action_taken: approved
rationale: >-
Incremental commit is a one-line Pyrefly target-version config change in pyproject.toml,
a trivially reversible dev-tooling knob with no production logic or shared-resource impact.
Full PR diff remains tooling/config/lockfile/version-string only.Sent by Cursor Automation: Assign PR reviewers & Assess Risk & Approve if Safe
mbertrand-kintsugi
left a comment
There was a problem hiding this comment.
The Pyrefly target now matches the lowest supported Python (3.10).


Summary
This repo type-checked with Pyrefly 1.1.1, aimed it at Python 3.12 even though the package supports Python 3.10 and later, and used a pre-commit hook id that does not run against the project venv. It now uses Pyrefly 1.3.2, targets Python 3.10, and runs the
pyrefly-typecheck-systemhook like the other Python repos.pyreflydev dependency~=1.1.1to~=1.3.2;poetry.lockregenerated with Poetry 2.5.1[tool.pyrefly] python-version3.12.0to3.10.0. This repo is a published library (python >=3.10), so Pyrefly targets the lowest supported Python to catch syntax and APIs that consumers on 3.10 cannot use. Services target their repo minor instead.pyrefly-check(rev 1.1.1) replaced bypyrefly-typecheck-system(rev 0.0.1, system language,always_run)[tool.ruff.lint]now statesselect = ["E4","E7","E9","F","I","UP","B","SIM","C4"]explicitly instead ofextend-select, because Ruff 0.16.0 widened its default rule set andextend-selectalone differs across Ruff versions.ruff checkandruff format --checkreport no new findings.0.3.6to0.3.7inpyproject.tomlandsquawk_alembic/__init__.py, which CI requires on every code-changing PR. Merging tomainmakes theauto-tagandreleasejobs tagv0.3.7and publish a GitHub Release, so consumers pinning by tag can adopt it.python >=3.10, CI matrix 3.10 to 3.14) is unchanged.Jira
PS-1717
Tests
Ran locally:
pre-commit run --all-files(all hooks pass, including Pyrefly),pytest -q(49 passed),pyrefly check(0 errors). CI runs the same checks plus the 3.10 to 3.14 test matrix.Document Checklist
N/A
🤖 Generated with Claude Code
Note
Low Risk
Tooling and version bumps only; no runtime or business-logic changes.
Overview
Upgrades Pyrefly from 1.1.1 to 1.3.2 and sets
[tool.pyrefly] python-versionto 3.10.0 so type checking matches the package’s minimum supported Python instead of 3.12.Pre-commit now uses the
pyrefly-typecheck-systemhook (withalways_run) instead ofpyrefly-check, aligned with other Python repos. Ruff lint rules are pinned via an explicitselectlist so behavior stays stable across Ruff 0.16’s wider defaults.poetry.lockis regenerated under Poetry 2.5.1, and the package is bumped to 0.3.7 with no source changes beyond the version constant.Reviewed by Cursor Bugbot for commit a9b7ea1. Bugbot is set up for automated code reviews on this repo. Configure here.