ty: An extremely fast Python type checker and LSP

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Python teams can replace slow type checkers like mypy and Pyright with a tool that catches errors in milliseconds instead of hundreds of milliseconds, making in-editor checking practical on large codebases.

Read this as

A company called Astral has released a free beta tool called ty that checks Python code for type mistakes, which are errors where data doesn't match what the code expects. It is dramatically faster than the existing tools developers use for this job, such as mypy and Pyright. Faster checking means errors show up almost instantly while coding rather than after a long wait.

Astral, the company behind uv and Ruff, has shipped the first beta of ty, a Python type checker claiming 10x to 60x speedups over mypy and Pyright without caching, and up to 500x over Pyrefly in one editor test. Adoption is essentially zero-cost: it is free, installable via uvx, and ships a VS Code extension. The risk is that it is a first beta, and even Willison found issues in his own sqlite-utils project.

Astral released the first beta of ty, a Python type checker and LSP server, runnable via 'uvx ty check' and through a new VS Code extension providing go-to-definition and diagnostics. Benchmarks claimed: no-cache checking 10x-60x faster than mypy and Pyright; recomputing diagnostics after editing a load-bearing PyTorch file took 4.7ms versus 386ms for Pyright and 2.38s for Pyrefly. The architecture enabling the speed is not described. Beta maturity limits production trust.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

ty Astral mypy Pyright Pyrefly sqlite-utils PyTorch

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading