Most Python type checkers trade off IDE responsiveness for thoroughness; the deciding constraint for large, active codebases is feedback latency, not peak-check throughput. Pyrefly flips that trade-off: it optimizes for sub-10ms editor rechecks and very high batch throughput so teams can run checks in CI and get instant feedback in the editor.
What Sets It Apart
- Extremely low-latency IDE experience: in-editor rechecks typically finish in under 10ms after a file save, making navigation, inlay hints, and autocomplete feel immediate. This reduces context-switch cost when editing large projects.
- High batch throughput with concrete benchmarks: reported checks of ~1.85 million lines per second and claims of being ~15x faster than Mypy/Pyright on projects like PyTorch. That combination means it can be used both as a fast local LSP and as a CI-level type checker for large repositories.
- Real-world adoption and ecosystem support: used at scale inside Meta (Instagram’s ~20M-line Python codebase) and adopted by major open-source ML projects; integrates with editors (VS Code, Neovim, Zed) and provides CLI helpers for migration, suppression, and inference to ease adoption.
Who It's For + Trade-offs
Great fit if you need near-instant type feedback in the editor and want a type checker that scales to multi-million-line repositories (teams using large ML codebases will find the responsiveness and throughput particularly valuable). Look elsewhere if you require strict semantic versioning guarantees (Pyrefly’s release policy allows breaking changes across minor releases), if your workflow depends on a particular type system edge-case that only Mypy/Pyright handle, or if you need an ecosystem of third-party stubs that aren’t yet supported.
Where It Fits
Pyrefly sits between heavy, conservative checkers used in long-running CI jobs and lightweight LSP-only language servers: it aims to be fast enough for both interactive editing and large-scale batch checks. For teams migrating from Mypy/Pyright, the provided migration and suppression tools lower the friction but plan for validation after upgrades due to possible behavior changes.
By presenting concrete latency and throughput goals alongside clear adoption and migration ergonomics, Pyrefly positions itself as an adoption-ready type checker for teams that prioritize developer velocity across large Python codebases.
