news.volyx.in

Ty: A fast Python type checker and language server (github.com)

916 points by arathore · 450 days ago · 287 comments on HN

Article summary

Ty is a new, fast Python type checker and language server written in Rust, claiming to be 10-100x faster than mypy and Pyright. It is currently in beta and offers features such as comprehensive diagnostics, configurable rule levels, and editor integrations. The project is still in development and not yet ready for production use. Ty's performance and accuracy are being compared to existing type checkers like mypy and Pyright.

Main themes

  • Python type checking
  • Language server performance
  • Rust implementation
  • Comparison to mypy and Pyright
  • Development and beta testing
  • Editor integrations and usability
  • Type inference and accuracy

What commenters say

  • Ty's speed is significantly faster than mypy and Pyright, but its type inference may not be as sophisticated as Pyright's.
  • Pyright's memory usage can be a problem, especially on laptops.
  • Some users have had negative experiences with Pyright, citing issues with accuracy and performance.
  • The comparison between Ty and mypy may not be fair due to Ty's developmental stage and potential for false errors or missed errors.
  • Basedpyright is an alternative to Pyright that includes additional features and functionality.
  • The choice of type checker depends on individual needs and priorities, such as speed, accuracy, and memory usage.
  • Ty's potential for high performance is promising, but its accuracy and reliability need to be improved.
  • The development of Ty and other type checkers is an active area of research and improvement.