4 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
Astral has released ty, a new type checker and language server for Python that outperforms existing tools like mypy and Pyright. Built in Rust, it offers rapid incremental updates and a robust diagnostic system. The beta version is available for installation via the uv tool or as a VS Code extension.
If you do, here's more
Astral has released a Beta version of "ty," a new Python type checker and language server built in Rust. Designed as a faster alternative to existing tools like mypy and Pyright, ty boasts performance gains of 10x to 60x without caching, and even more impressive speeds during live edits in an editor. For instance, after modifying a crucial file in the PyTorch repository, ty updated diagnostics in just 4.7 milliseconds, compared to 386 milliseconds with Pyright and 2.38 seconds with Pyrefly.
The architecture of ty emphasizes "incrementality," allowing it to efficiently re-run necessary computations when files are edited. This design choice significantly enhances responsiveness in development environments. Ty offers advanced features like intersection types, type narrowing, and a robust diagnostic system that provides context-rich error messages. For example, when a type mismatch occurs, ty highlights the issue at both the assignment point and the declaration site, aiming to deliver accurate feedback without making unwarranted assumptions about user intent.
Currently, ty can be installed via the uv package manager or directly through a VS Code extension. Astral plans to refine ty further before a stable release next year, focusing on stability, bug fixes, and compatibility with popular libraries like Pydantic and Django. The broader vision includes using ty to enable semantic capabilities across their toolchain, such as dead code elimination and type-aware linting. The development of ty involved significant collaboration, drawing on expertise from contributors and other programming communities.
Questions about this article
No questions yet.