news.volyx.in

Announcing the Beta release of ty (astral.sh)

854 points by gavide · 219 days ago · 179 comments on HN

Article summary

The article announces the beta release of ty, a fast Python type checker and language server written in Rust, designed as an alternative to tools like mypy, Pyright, and Pylance. ty is built with a focus on performance, correctness, and ergonomics, and is designed to power a language server with live updates. The tool is now available for installation and is recommended for motivated users for production use. The developers plan to work towards a stable release next year, focusing on stability, bug fixes, and completing features in the Python typing specification.

Main themes

  • Python type checking
  • Language servers
  • Tool performance
  • Rust implementation
  • Python ecosystem

What commenters say

  • The choice of type checker should not be based solely on spec conformance, as it does not represent the features that most users care about.
  • Pyright is a good type checker, but its speed can be a limiting factor, making ty a potentially attractive alternative.
  • Mypy is still a precise type checker and supports many complicated cases, despite not having 100% conformance with the spec.
  • The conformance test suite has limitations, as it focuses mainly on explicit type annotations and does not cover aspects like inference and diagnostics.
  • Type checker speed is not always a bottleneck, but it can be bothersome and impact user experience.
  • The difference between type checkers like mypy and Pyright lies in their approach to inference and type safety, with some allowing more flexibility than others.