An extremely fast Python type checker and language server, written in Rust.
Type checking the home-assistant project without caching.
ty is backed by Astral, the creators of uv and Ruff.
Highlights
- 10x - 100x faster than mypy and Pyright
- Comprehensive diagnostics with rich contextual information
- Configurable rule levels, per-file overrides, suppression comments, and first-class project support
- Designed for adoption, with support for redeclarations and partially typed code
- Language server with code navigation, completions, code actions, auto-import, inlay hints, on-hover help, etc.
- Fine-grained incremental analysis designed for fast updates when editing files in an IDE
- Editor integrations for VS Code, PyCharm, Neovim and more
- Advanced typing features like first-class intersection types, advanced type narrowing, and sophisticated reachability analysis
Getting started
Run ty with uvx to get started quickly:
ty will check all Python files in the working directory or project by default.
See the type checking documentation for more details.
Installation
To install ty, see the installation documentation.
To add the ty language server to your editor, see the editor integration guide.
Playground
ty has an online playground you can use to try it out on snippets or small projects.
Tip
The playground is a great way to share snippets with other people, e.g., when sharing a bug report.