Astral releases ty 1.0, a Rust Python type checker, for production use

Astral, the company behind the Python package manager uv and the linter and formatter Ruff, has announced the 1.0 release of ty, a Python type checker and language server written in Rust. It is designed as an alternative to mypy, Pyright and Pyrefly. Astral says it is ready to recommend ty for production use, for all users. Install with uv tool install ty@latest, or through the VS Code extension.
The headline adoption claim is OpenAI. Astral says ty is now the default and most widely-deployed type checker there, covering many millions of lines of critical Python. It adds that migrating to ty internally gave a median 24x speedup and a 73% drop in peak memory use. The post does not name the tool that was replaced or explain how the median was computed. Astral also says ty has grown rapidly while still in Beta, with adoption in projects such as FastAPI and tox. In a November audit of the 25,000 most-downloaded PyPI packages, 11.6% of repositories with a type checker used ty, putting it third behind mypy and Pyright. Among repositories created in the last year, 22.6% used ty, 26.0% used Pyright and 62.9% used mypy.
On speed, Astral reports its own benchmarks. ty was the fastest type checker on 16 of 18 ecosystem projects, 1.46x faster than Pyrefly and 3.56x faster than Zuban (both written in Rust) by geometric mean. In editor benchmarks it was the fastest language server on 14 of 17 projects, 7.73x faster than Pyrefly and 3.22x faster than Zuban. The architecture is built around incrementality, which keeps live updates fast in an editor or other long-lived process. Astral plans to use that incrementality for workflows beyond the editor.
On correctness, ty takes an approach based on gradual and set-theoretic typing. On the Python typing conformance suite, which Astral calls an imperfect proxy for real-world correctness, ty now records 14 false positives and 13 false negatives, down from 224 and 405 at the Beta release. For comparison, mypy reports 190 false positives and 109 false negatives.
1.0 includes a new generics solver and wider bidirectional inference. Astral gives examples. In one, of eight type checkers tested, only ty both reported a misspelled key and accepted the corrected function. In another, a function called satisfies_all conjoins any number of predicates. ty infers that the resulting validator needs an input that has a length and yields integers, so it accepts [1, 2, 3] and rejects iter([1, 2, 3]). Mypy infers Never and rejects both calls. Pyright infers Sized and flags the call to satisfies_all. Pyrefly infers Sized | Iterable[int] and accepts the iterator, which fails at runtime.
Return type inference for functions without return annotations is added as an opt-in feature. In Astral's example, a decode function checks that a log record has an id before returning it. ty carries that information to the caller and accepts record.id. With inference enabled, Pyright, Pyrefly and Zuban infer LogRecord and flag the access, and mypy infers Any.
The tooling around diagnostics also grows. A single diagnostic can link a warning to its cause, even across files, and suggest a fix; ty check --fix now applies those fixes automatically. For migrating an existing project, ty check --add-ignore adds suppression comments in one pass. Alternatively, teams can configure a diagnostic baseline and run ty check --update-baseline to record existing diagnostics in a separate file. Commit that file and CI can flag new errors while old ones are fixed over time. The uv integration, which lets ty check standalone scripts that declare dependencies through inline metadata (PEP 723) in a separate environment for each script, is available in preview. Enable it in the ty configuration with project-manager.script set to uv.
Astral also tuned strictness. ty now infers more precise types for containers and attributes without annotations, so it can catch errors in lightly typed code. It relaxed some narrowing rules after checks like isinstance, so common Python patterns need fewer casts or annotations. In Astral's example, a parameter annotated Term | list[Term] is narrowed by isinstance(terms, list). A subclass of Term could also inherit from list[str], so the list could hold strings. By default ty accepts term.text, and it flags the access when strict generic narrowing is switched on. Astral says these changes came from working with users and reviewing real projects, balancing precision and usefulness against soundness. Users who want soundness can turn on opt-in settings such as strict generic narrowing, which Astral says often go beyond what other checkers support. ty also supports many type-enforcement rules popular in mypy's strict mode, and can warn when a function returns Any, including partially-Any cases that mypy's warn-return-any misses.
The post's author, who is not named in the text, calls ty the most technically ambitious project they have worked on and thanks the core team by first name: Alex, Andrew, Aria, Carl, David, Dhruv, Doug, Ibraheem, Jack, Lérè, Micha and Shunsuke. Astral's immediate priority is supporting users as they adopt ty. With the core built, it wants to explore wider uses: type-aware linting, dead-code elimination, unused dependency analysis, type-aware test selection and more. It commits that ty will get significantly better every week, as Ruff and uv have.
Key facts
- Astral released ty 1.0, a Rust-written Python type checker and language server, and recommends it for production use for all users.
- Astral says ty is the default type checker at OpenAI, and that migrating internally gave a median 24x speedup and a 73% drop in peak memory.
- In Astral's own benchmarks ty was the fastest type checker on 16 of 18 projects (1.46x faster than Pyrefly, 3.56x faster than Zuban by geometric mean) and the fastest language server on 14 of 17.
- On the typing conformance suite ty now shows 14 false positives and 13 false negatives, down from 224 and 405 at Beta; mypy shows 190 and 109.
- New in 1.0: ty check --fix, ty check --add-ignore, diagnostic baselines, opt-in return type inference and a preview uv integration for PEP 723 scripts.
Why it matters
Type checking is a slow step in large Python codebases, and ty is the first Astral release aimed at it after uv and Ruff. Astral says ty is the default type checker at OpenAI and covers many millions of lines of code, which, if accurate, is a large production deployment. A 1.0 label with a production recommendation also moves ty from a Beta to a tool Astral asks everyone to use. Astral says it also wants to build on ty's engine, for example type-aware linting and dead-code elimination.
Who it affects
Python teams that use mypy, Pyright or Pyrefly for CI checks or editor feedback are the main audience, along with maintainers of large codebases where checker speed and memory use hurt. Existing uv and Ruff users get a tool from the same vendor. Developers who write standalone scripts with inline dependency metadata (PEP 723) are covered by the preview uv integration. In Astral's PyPI audit, newer repositories lean toward ty more than older ones do.
How to use it
Install with uv tool install ty@latest, or use the VS Code extension. To adopt ty in an existing project, run ty check --add-ignore to add suppression comments in one pass. Or configure a diagnostic baseline and run ty check --update-baseline, then commit the baseline file so CI flags only new errors. ty check --fix applies suggested fixes automatically. To check PEP 723 scripts through uv, set project-manager.script to uv in the ty configuration; this is in preview. Return type inference for unannotated functions and strict generic narrowing are both opt-in. The source gives no pricing or licence.
How solid is it
This is Astral's own announcement, so every benchmark, the OpenAI claim and the adoption figures are first-party. The speed results come from Astral's benchmarks, and the post does not give the hardware, method or project list. The OpenAI deployment is Astral's statement, with no OpenAI comment in the post, and the 24x and 73% figures are described as internal results without a named baseline. Astral itself calls the conformance suite an imperfect proxy for real-world correctness. The PyPI audit figures (11.6% overall, third behind mypy and Pyright) are specific and dated to November.
Risks and caveats
ty was still in Beta until this release, and Astral says it has made ty stricter in some places and more permissive in others, so results may differ from your current checker. The relaxed isinstance narrowing is a deliberate trade-off against soundness; strict generic narrowing must be switched on to catch the case in Astral's example. The uv script integration is only a preview. The benchmark wins are not universal: ty was not the fastest on 2 of 18 type checking projects or on 3 of 17 editor projects. The future uses Astral lists have no timescale.
“We’re ready to recommend it for production use, for all users.”
— Astral, ty 1.0 announcement