ty 1.0 is Astral’s Rust-based Python type checker and language server, positioned as an alternative to mypy, Pyright, and Pyrefly and now recommended for production use. Its focus on incremental analysis produces fast command-line checks and especially rapid editor updates. Across 18 ecosystem projects, ty was fastest on 16 for cold checks, averaging 1.46 times the speed of Pyrefly; in editor benchmarks, it led on 14 of 17 projects. At OpenAI, switching to ty brought a median 24-fold speedup and cut peak memory use by 73% across millions of lines of Python. Adoption has climbed quickly: downloads increased 29-fold in a year, and ty was the third-most-used checker in a survey of popular PyPI packages.
The release also emphasizes typing behavior, not just speed. Its gradual, set-theoretic approach and improved generics solver support bidirectional inference, helping catch errors in generic functions and infer more precise types from context. On a typing conformance suite, ty’s false positives and false negatives fell substantially from its beta results. Version 1.0 adds built-in understanding of libraries including Pydantic, Django, pytest, and attrs, plus optional inference of unannotated return types. Diagnostics can trace problems to their causes across code, suggest corrections, and apply fixes automatically. For existing projects, migration tools can add ignore comments or establish a baseline so teams can address old findings gradually while detecting new ones.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.