Google announced it has adopted Pyrefly as its Python type checker, replacing Pytype after years of service. The company said the decision was driven by Pyrefly's speed, accuracy and lower infrastructure costs.
Pytype worked by analyzing compiled bytecode rather than source abstract syntax trees. Google said keeping pace with modern typing PEPs became an increasing maintenance burden, with bytecode instability across Python releases making updates difficult.
Internal benchmarks cited by Google show Pyrefly is approximately 10 times faster than Pytype, reduces incremental rebuild latency by up to 98%, and cuts peak compute cost for Python type checking by more than 80%. The company also reported a 90 to 99% reduction in type-checking time along clean-build critical paths, saying this substantially eliminated a long-standing development bottleneck.
Google said Pyrefly has strong conformance to Python's typing specification, passing about 97% of tests in the conformance suite. It is also actively supported by the community, helping it keep pace with new syntax, and its diagnostics offer more actionable feedback, including inline code annotations that pinpoint the root cause of errors and, in some cases, suggest fixes.
Reaction among developers has been mixed. Commenting on Google's announcement, one user, Gushys, said Pyrefly is much more mature, is already past version 1.0, has similar performance to ty, and is a proven tool, while ty is not quite there yet. WindHawkeye countered that Mypy is much faster in large setups than people think and still has the fastest incremental type check. BeamMeUpBiscotti replied that Mypy 2.0 is expected to be up to five times faster on large projects for cold checks, but that newer generation checkers can be an order of magnitude faster still.
Python developer Amirrea Azadmher, commenting on LinkedIn, argued that a type checker's value lies not merely in saving 30 seconds in CI pipelines but in how it improves the edit-check loop during development. He advised developers not to trust someone else's monorepo numbers when evaluating Pyright, Pyrefly and Mypy, and to measure cold and warm times on their own tree, scoring diagnostics quality beside throughput, since a fast checker that floods you with noise still costs more than a slower one that points at the real break.
Meta open-sourced Pyrefly last year. The tool is implemented in Rust and, according to Meta, can check 1.8 million lines of code per second on large codebases, making typechecking on every keystroke possible.
