# ty: Astral's New Python Type Checker Released


[Astral](https://astral.sh) released [ty](https://pydevtools.com/handbook/reference/ty.md), a Python type checker written in Rust, today. The company behind uv and Ruff designed ty as an alternative to [mypy](https://pydevtools.com/handbook/reference/mypy.md) and [pyright](https://pydevtools.com/handbook/reference/pyright.md), with performance as a primary focus.

## Speed Benchmarks

According to Astral's benchmarks:

- ty checks the home-assistant project in 2.19 seconds (20x faster than mypy's 45.66 seconds)
- After editing a file in PyTorch, ty recomputes diagnostics in 4.7ms (80x faster than pyright's 386ms)

## Key Features

ty includes several design choices that distinguish it from existing type checkers:

- Advanced type narrowing: More sophisticated reachability analysis reduces false positives
- First-class intersection types: Handles complex type relationships
- Detailed diagnostics: Error messages pull context from multiple files, explaining both the problem and potential fixes
- Language server: Full LSP support for Go to Definition, Symbol Rename, Auto-Complete, and other editor features

## Installation

Install ty with uv:

```bash
uv tool install ty
```

Or use the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=astral-sh.ty) for editor integration.

Check your project:

```bash
ty check .
```

The language server works with any LSP-compatible editor (VS Code, Cursor, Neovim, Emacs).

## Current Status

ty is in beta. Astral recommends it for motivated users willing to report issues. The team is targeting a stable release in 2026, focusing on:

- Stability and bug fixes
- Complete implementation of Python's typing specification
- First-class support for libraries like Pydantic and Django

Future plans include integration with Ruff and uv for features like dead code elimination and type-aware linting.

## Learn More

- [ty documentation](https://docs.astral.sh/ty/)
- [How to try the ty type checker](https://pydevtools.com/handbook/how-to/how-to-try-the-ty-type-checker.md)
- [How do mypy, pyright, and ty compare?](https://pydevtools.com/handbook/explanation/how-do-mypy-pyright-and-ty-compare.md)
- [How to gradually adopt type checking in an existing Python project](https://pydevtools.com/handbook/how-to/how-to-gradually-adopt-type-checking-in-an-existing-python-project.md)
- [Astral's announcement post](https://astral.sh/blog/ty)
- [ty GitHub repository](https://github.com/astral-sh/ty)
