Skip to content

Switch CI type checking from mypy to Pyrefly - #1068

Merged
jhale merged 3 commits into
mainfrom
jhale/check-with-pyrefly
Sep 18, 2026
Merged

jhale merged 3 commits into
mainfrom
jhale/check-with-pyrefly

Conversation

@jhale

@jhale jhale commented Sep 14, 2026

Copy link
Copy Markdown
Member

Switches CI type checking from mypy to Pyrefly, following the same approach as dolfinx#4500.

  • [tool.pyrefly] in the root pyproject.toml (python/basix, demo/python, test; auto-discovered, no --config flag needed).
  • pyrefly-baseline.json baselines the 22 pre-existing diagnostics so they don't block CI, while new ones still fail it.
  • CI: one Pyrefly check step in the build job (needs Basix built and installed to resolve its compiled-extension types), replacing the mypy steps in lint, no-isolation-python-build, and both windows.yml jobs.
  • AGENTS.md: updated linting instructions.

Verified locally with Pyrefly 1.3.0: pyrefly check --error-stale-baseline passes; ruff/gersemi unaffected.

jhale and others added 2 commits September 14, 2026 16:07
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
jhale added this pull request to stack #1070 September 14, 2026 14:19
@jhale jhale changed the title jhale/check with pyrefly Switch CI type checking from mypy to Pyrefly Sep 14, 2026
@jhale
jhale marked this pull request as ready for review September 14, 2026 14:21
@jhale
jhale added this pull request to the merge queue Sep 18, 2026
Merged via the queue into main with commit e04f98b Sep 18, 2026
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant