Skip to content

Astral ships ty 1.0, a Rust-built Python type checker

ty leaves beta with built-in Pydantic, Django, pytest and attrs support, and a 24x speedup over OpenAI's previous internal setup.

Source: Astral

Astral, the team behind uv and ruff, released ty 1.0 on 1 December: a Python type checker and language server written in Rust, now stable enough to recommend for production. It’s built as an alternative to mypy, Pyright and Pyrefly, with a new generics solver and bidirectional inference added for this release, plus built-in support for Pydantic, Django, pytest and attrs.

Astral says ty is now the default type checker at OpenAI, covering “many millions of lines” of internal Python, where migrating produced a median 24x speedup and a 73% cut in peak memory use. Across 18 ecosystem projects it benchmarked as the fastest checker on 16, and the fastest language server on 14 of 17. On the typing conformance suite it’s down to 14 false positives and 13 false negatives, from 224 and 405 at beta. Install it with uv tool install ty@latest or the VS Code extension.

uv tool install ty@latest
ty check --fix

Why it matters: a type checker you can trust enough to block CI on is a different proposition from one you run for hints. If ty’s numbers hold up outside Astral’s own benchmarks, it’s a serious option for anyone currently waiting on mypy or Pyright in a large codebase.

The caveat: the speedup and memory figures come from Astral’s own internal migration and benchmarks, not an independent test. PEP 723 script support is still only in preview.

Share

Related reading

More from The Wire

All briefs

node-tar patches a Windows RCE bug triggered by npm install

A newline-injection flaw in node-tar let a crafted archive forge its own file paths and run code during npm install on Windows. The fix landed in a string of releases up to 8.1.0 on 2 December.

via GitHub Security Advisories (isaacs/node-tar)