Google has retired Pytype, its long-serving Python type checker, in favour of Pyrefly, an open-source tool originally built at Meta.
The reason is structural rather than stylistic. Pytype analysed compiled bytecode instead of source syntax trees, which meant every Python release risked breaking it. As the language’s typing system grew through successive PEPs, keeping pace became a permanent maintenance tax.
Pyrefly reads source directly, and Google’s internal measurements put it about 10 times faster than Pytype. Incremental rebuild latency drops by up to 98 percent, peak compute for Python type checking falls more than 80 percent, and the company reports a 90 to 99 percent cut in type-checking time along clean-build critical paths. It also passes roughly 97 percent of the typing spec conformance suite.
Diagnostics improved too, with inline annotations that point at the root cause of an error and sometimes propose a fix.
The move lands in a competitive field. Developers debated it on the announcement thread, weighing Pyrefly against Astral’s ty and the established Mypy. One commenter called Pyrefly the more mature option, past version 1.0 and at similar speed to ty. Another argued Mypy remains fastest on incremental checks in large setups, though the newer generation of checkers can run an order of magnitude quicker on cold builds.
For a codebase the size of Google’s, tooling cost is a line item measured against developer waiting time. Cutting the checker’s compute footprint by four fifths and nearly eliminating incremental delays changes how often the check can run at all.