build: the fourteen type rules the gate names are errors, so a regression fails CI instead of scrolling past - #325
Merged
Merged
Conversation
Documentation build overview
11 files changed ·
|
FBumann
force-pushed
the
fix/pyrefly-gate
branch
from
September 1, 2026 16:00
e514d1c to
85eb8a0
Compare
…sion fails CI instead of scrolling past Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
FBumann
force-pushed
the
fix/pyrefly-gate
branch
from
September 1, 2026 16:36
85eb8a0 to
f38b891
Compare
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.
Note
The following content was generated by AI.
[tool.pyrefly.errors]said those fourteen rules were "promoted to error, so a regression fails the gate instead of scrolling past", and that "all of these are already clean". Neither was true: in pyrefly 1.2.0rule = trueenables a rule at its default severity, so nine warnings scrolled past a green gate. The severity string is what promotes. The comment is now the behaviour.The nine, all in
src/math_spec:unnecessary-type-conversionfloat()on afloatindimensions.py, threestr()on astrinresolution.pyredundant-castlowering.pycastingVariableDomain,VariableAbsenceandSosTypeto theLiterals the model already declaresuntyped-importimport yaml, no stubsDropping the three casts leaves
Literalandcastunused inlowering.py; both imports go.types-pyyamljoins[feature.test.dependencies]beside pyrefly — the checker's own hint, and it keepsuntyped-importa gate rather than a rule with a standing exception.Verified
pixi run ciexit 0: lint clean (12 jobs), 911 passed,mkdocs build --strictbuilds, 27 TeX documents compile.pyrefly checkis 0 errors, 0 warnings — the "N warnings not shown" line is gone, which is the claim.The guard here is the gate, not a test. No pytest case can reach a severity in
pyproject.toml, so the evidence is the mutation, run on the committed tree and restored withgit checkout --:Mutation table
pyrefly check= true, code cleanfloat()regression reintroduced, new config= trueconfigtypes-pyyamlremovedRows three and four are the pair the PR exists for: one regression, failing under the new spelling and passing under the old.
Not done, deliberately
No new annotations, and no second checker. The question that started this was prompted by basedpyright annotations in an editor — 28 errors and 471 warnings over the same 26 files pyrefly calls clean. They do not survive reading: 133
reportAnyand 68reportExplicitAnyare pydanticmode='before'validators and the YAML door, where arbitrary input is the construct; 135reportUnknown*are the pyparsing seam[tool.pyrefly]already documents and suppresses per line; 74 arereportImplicitStringConcatenation. Annotating those away means saying something less true thanAny. Two of its rules might be worth having on their own merits —reportImplicitOverrideandreportUnnecessaryIsInstance, both of which pyrefly has equivalents for — and that is a separate question about pyrefly's rule list, not an argument for running two checkers that disagree about whethersrc/is clean.untyped-importwas kept rather than dropped. Adding a stub package to satisfy a rule is the larger change; the alternative was deleting the rule from the list with a reason. Kept because twoimport yamllines are cheap to make answerable and the rule then guards the next untyped import.