2025-12-16 · Astral

ty: An extremely fast Python type checker and LSP

tooling

read at source ↗ astral.sh

ty: An extremely fast Python type checker and LSP

Source: Astral Date: 2025-12-16 URL: https://astral.sh/blog/ty

Summary

Astral launched ty in Beta — a Rust-built Python type checker and language server positioned as a drop-in replacement for mypy, Pyright, and Pylance. On full-project checks ty runs 10-60x faster than mypy/Pyright without caching; on incremental edits the gap widens to 80x vs Pyright and 500x vs Pyrefly. Installs via uv tool install ty@latest; ships an MIT-licensed VS Code extension and a browser playground.

Implications

The Rust-rewrite-of-Python-tooling pattern reaches type checking. Astral has now colonised linting (ruff), formatting (ruff fmt), package management (uv), and type-checking (ty) — the full static-analysis stack. mypy and Pyright are the incumbents under pressure here; Pyrefly (Meta’s type checker) is caught in the benchmarks looking an order of magnitude slower on incremental edits.

  • Python tooling consolidation: Astral is converging the ecosystem onto a single vendor for the core developer loop. Each new tool makes the adjacent ones stickier — if you’re already on uv+ruff, ty is a one-command install with no new dependency chain.
  • LSP-first design matters: ty is built as a language server with type checking as a side effect, not the reverse. That architectural choice (incremental computation, Salsa-style query model) is why the incremental numbers are so much more striking than the cold-start numbers.
  • mypy is the slow-moving target. Pyright is faster but still JS/Node; mypy is pure Python. Both are structurally disadvantaged vs a Rust LSP. Watch for gradual-typing shops that were blocking on mypy speed to adopt ty in 2025-2026.

← all signals