RepositoryPython
United States
United StatesAS
astral-sh/ty
An extremely fast Python type checker and language server, written in Rust.
20.2kstars
356forks
993issues
1views
⚡ ty: Rust-speed Python type checking
Type errors at Rust speed, in CLI or editor.
ty is an extremely fast Python type checker and language server written in Rust, backed by Astral (creators of uv and Ruff). It aims to bring near-instant type checking and rich editor features to Python projects, from small scripts to large codebases.
✨ Highlights
- Blazing speed: 10x - 100x faster than mypy and Pyright, even without caching.
- Rich diagnostics: Comprehensive diagnostics with rich contextual information.
- Flexible rules: Configurable rule levels, per-file overrides, suppression comments, and first-class project support.
- Gradual adoption: Support for redeclarations and partially typed code to ease migration.
- Built-in language server: Code navigation, completions, code actions, auto-import, inlay hints, on-hover help, etc.
- Fine-grained incrementality: Designed for fast updates when editing files in an IDE.
- Editor integrations: VS Code, PyCharm, Neovim and more.
- Advanced type system: First-class intersection types, advanced type narrowing, and sophisticated reachability analysis.
💡 Why it matters
ty shifts type checking from a slow batch step to something usable in the editor loop. By running in Rust with fine-grained incremental analysis, feedback stays responsive on large projects without slowing down edits. Its focus on gradual typing also makes it easier to adopt without forcing an all-or-nothing switch.
#Python #TypeChecker #Rust #LanguageServer #TiniX