HudHud Tech — Tech & AI news platform
Monday, 19 October 2026
Breaking
Software & Apps

Google Adopts Pyrefly for Faster, More Accurate Python Type Checking

18 October 2026 2 min read هدهد تك | Hudhud Tech

Google has replaced its long-standing Python type checker, Pytype, with Pyrefly, an open-source tool originally developed by Meta. The decision was driven by Pyrefly’s advantages, including faster and more accurate type checking, and lower infrastructure costs.

As Python’s typing system evolved rapidly, Pytype faced fundamental challenges. It analyzed compiled bytecode rather than source Abstract Syntax Trees (ASTs), making it difficult to keep up with modern typing PEPs due to bytecode instability across Python releases.

According to Google’s internal benchmarks, Pyrefly is approximately 10 times faster than Pytype, reduces incremental rebuild latency by up to 98%, and cuts peak compute costs for Python type checking by more than 80%. Google also reported a 90–99% reduction in type-checking time along clean-build critical paths, effectively eliminating a long-standing development bottleneck.

Key Strengths of Pyrefly

One of Pyrefly’s key strengths is its strong conformance to Python’s typing specification, passing about 97% of tests in the conformance suite. The tool is actively supported by the community, which helps it keep pace with new syntax. Its diagnostics provide actionable feedback, including inline code annotations that pinpoint the root cause of errors and sometimes suggest fixes.

Community Response

The community has responded positively to Google’s announcement. Many commenters agreed that Pytype performs worse than Pyrefly, while others debated Pyrefly’s merits compared to Ty and Mypy. Some noted that Pyrefly is more mature, having reached past version 1.0 and demonstrating similar performance to Ty.

Others observed that Mypy performs well in large setups, with Mypy 2.0 expected to be significantly faster on large projects. However, newer type checkers like Pyrefly can be much faster than Mypy, especially in cold checks.

On LinkedIn, Python developer Amirrea Azadmher shared a different perspective, emphasizing that the value of a type checker lies not just in saving time in CI pipelines but also in improving the edit-check loop during development. He advised developers to measure cold and warm times on their own projects when evaluating type checkers.

 

Source: InfoQ

What do you think of this story?

Share this story: