Note: I like using em-dashes while writing! Don’t worry, this is not written by AI. (context) Earlier this month, two new Rust-based Python type checkers hit the spotlight: pyrefly and ty. Although neither is officially released, they are a welcome change to the Python type checking world, historically dominated by mypy and pylance. While both are open-source and publicly downloadable for quite some time, there have not been any official announcements by Meta nor Astral on their brand new next-generation Python type checkers — until last week. At PyCon 2025, nestled away in a quiet Room 319 at the Typing Summit, we had our first official sneak peek into both of these tools — the team behind them, their goals, visions, and ambitions — and their unique approaches to tackling Python’s typing problems. ty team presenting at the typing summit This blog is a collection of rough notes scribbled during the event, personal conversations with the team, and not-too-thorough experiments that I’ve run myself. As such, some details might be a little blurry. Also, both of these tools are still in early alpha! Please do not use this as a definitive judgment as to which one is better and/or worse. This blog is just for fun to see what state the two tools are at now! The following tests and experiments were performed on the latest versions of pyrefly, ty, mypy, and pyright as of writing this blog: pyrefly 0.17.0 ty 0.0.1-alpha.7 (afb20f6fe 2025-05-26) mypy 1.15.0 (compiled: yes) pyright 1.1.401 Pyrefly Pyrefly is Meta’s new Rust-based Python type checker, replacing Pyre — Meta’s previous Python type checker written in OCaml. The hopes are that Pyrefly should be faster, more portable, and more capable compared to Pyre. One key thing the Pyrefly team made very clear this year is that they want to be truly open source. Pyre was also technically open source, but it was more of a “we built this for our needs, but here’s the source code if you want it”. In contrast, one of the foundational...
First seen: 2025-05-27 16:56
Last seen: 2025-05-28 15:01