Repository navigation
Conversation
Replace the hand-maintained per-file `project-includes` allow-list (and the CI "zero errors not in whitelist" ratchet) with pyrefly 1.1's native baseline, and bump the checker in the same change because the two are coupled: the stricter 1.1.1 engine (~92% typing-spec conformance vs ~70% for 0.24.2) reports new diagnostics on previously-clean files, which the baseline absorbs. - pyproject.toml + uv.lock: pyrefly 0.24.2 -> 1.1.1 (regenerated with `uv lock`). - pyrefly.toml: project-includes is now the full globs (nemo_rl/examples/docs/ tools); the explicit allow-list is deleted. - pyrefly-baseline.json: snapshot of all 1261 existing errors (`pyrefly check --update-baseline`). Matched on (path, rule, column), so it is resilient to line drift. - pre-commit + CI now run `pyrefly check --baseline pyrefly-baseline.json`, failing only on NEW errors in any file (new or existing). No more editing pyrefly.toml when a file becomes clean, and per-line gating means new code in an already-"dirty" file is type checked too. Shrink the baseline over time with `pyrefly check --update-baseline` as errors are fixed. No source (.py) changes. Signed-off-by: Terry Kong <[email protected]>
4 tasks done
RNabel
added a commit
that referenced
this pull request
Nov 19, 2026
Pin pyrefly 1.4.0 and replace the per-file allow-list in pyrefly.toml, and the CI step that kept it complete, with pyrefly's baseline file. Every file under nemo_rl, examples, docs and tools is now checked, and the check fails only on errors that are not recorded in pyrefly-baseline.json. The baseline holds the 1,610 errors that exist today. Five suppression comments are renamed to the error codes 1.4.0 uses. This revives the approach of #3080 on current main. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Robin Nabel <[email protected]>
This branch has not been deployed
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.
What
Upgrade the pinned type checker
pyrefly 0.24.2 → 1.1.1and replace the hand-maintained per-fileproject-includesallow-list (plus the CI "zero errors not in whitelist" ratchet) with pyrefly 1.1's native baseline file.The two are coupled: the stricter 1.1.1 engine (~92% typing-spec conformance vs ~70% for 0.24.2) reports new diagnostics on previously-clean files, which the baseline absorbs — so they land together.
Changes
pyproject.toml+uv.lock:pyrefly==1.1.1(regenerated withuv lock).pyrefly.toml:project-includesis now the full globs (nemo_rl/examples/docs/tools); the explicit allow-list is deleted.pyrefly-baseline.json: snapshot of all existing errors (pyrefly check --update-baseline). Matched on(path, rule, column), so it's resilient to line drift.pyrefly check --baseline pyrefly-baseline.json— failing only on new errors in any file (new or existing).Why it's better than the allow-list
pyrefly.tomlwhen a file becomes clean (the CI ratchet is gone).pyrefly check --update-baselineas errors are fixed.No source (
.py) changes.🤖 Generated with Claude Code