Switch CI type checking from mypy to Pyrefly - #1068
Merged
Merged
Conversation
Consolidates the Pyrefly settings into `[tool.pyrefly]` in the repository-root pyproject.toml (auto-discovered, no --config flag needed) instead of a standalone pyrefly.toml, and records the 22 pre-existing diagnostics in pyrefly-baseline.json so they don't block CI while new diagnostics still fail it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DufZTv24tYPshRaUq1UBKW
jhale
added this pull request to stack #1070
September 14, 2026 14:19
jhale
marked this pull request as ready for review
September 14, 2026 14:21
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.
Switches CI type checking from mypy to Pyrefly, following the same approach as dolfinx#4500.
[tool.pyrefly]in the rootpyproject.toml(python/basix,demo/python,test; auto-discovered, no--configflag needed).pyrefly-baseline.jsonbaselines the 22 pre-existing diagnostics so they don't block CI, while new ones still fail it.Pyrefly checkstep in thebuildjob (needs Basix built and installed to resolve its compiled-extension types), replacing the mypy steps inlint,no-isolation-python-build, and bothwindows.ymljobs.AGENTS.md: updated linting instructions.Verified locally with Pyrefly 1.3.0:
pyrefly check --error-stale-baselinepasses; ruff/gersemi unaffected.