Run Pyrefly in CI#14499
Open
yangdanny97 wants to merge 6 commits into
Open
Conversation
abitrolly
reviewed
Jul 5, 2026
Comment on lines
+273
to
274
| # pyrefly: ignore [bad-assignment] | ||
| module: _SubcommandModule = importlib.import_module(_COMMANDS[command_name]) |
Author
There was a problem hiding this comment.
The exact error is
ModuleType is not assignable to _SubcommandModule
ModuleType.parser_description or _SubcommandModule.parser_description uses __getattr__, which cannot be checked for override compatibility
It comes from here: https://github.com/facebook/pyrefly/blob/ce5d522246ead87f02dc58fb28731fd9f51e2a16/pyrefly/lib/alt/attr.rs#L1456
Maybe it's a gap in Pyrefly that we can address (I've filed facebook/pyrefly#4077) but I don't think it's necessarily blocking here
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.
Per discussion on #14496, this PR replaces the ty github action with pyrefly, another Rust-based Python type checker.
Pyrefly was already included as a development dependency, but it was not pinned to a specific version. This PR pins it to 1.1.1, so that updates do not break the CI unless maintainers choose to upgrade. The local Pyrefly configuration has been updated to better-reflect mypy's configurations, and newly-introduced errors have been suppressed (~50 total).
closes #14496
fixes #14238