On December 1, 2026, Astral — the team behind uv and Ruff — shipped ty 1.0, the first stable release of its Python type checker and language server. The announcement came with a line that should make every Python developer pay attention: ty is now the default and most widely deployed type checker at OpenAI, covering many millions of lines of critical Python.
I have watched the Python tooling story for years, and the pattern is familiar by now. Astral ships a Rust rewrite of a slow tool, it is absurdly fast, and within a year it is the default everywhere. Ruff did it to linting. uv did it to packaging. Now ty is doing it to type checking.
This post is a hands-on guide: what ty 1.0 actually is, what the numbers mean (and which ones to trust), and a step-by-step migration you can run on your own project in about fifteen minutes.
What ty is
ty is a Python type checker and language server written in Rust, designed as an alternative to mypy, Pyright, and Pyrefly. It checks your types — catching the bugs that only show up at runtime — and it powers the squiggles, completions, and go-to-definition in your editor.
Two things make it different from the checkers you already know. First, speed: it is built around fine-grained incrementality, so after the first check, editing a file re-checks only what changed. Second, its type system is built on gradual, set-theoretic typing — a different foundation from mypy or Pyright — which Astral believes will let it catch errors the others miss, and eventually power things like type-aware linting and dead-code elimination.
The numbers — and how much to trust them
Every number below comes from Astral's own announcement and benchmarks. Astral chose the projects and ran the measurements, so treat the speed multiples as the vendor's claim, not an independent reproduction. That said, the adoption numbers are harder to fake, and they tell the same story.
| Metric | What Astral reports |
|---|---|
| Speed vs other checkers | Fastest on 16 of 18 ecosystem projects; 1.46x faster than Pyrefly and 3.56x faster than Zuban (geometric mean) |
| Editor speed | Fastest language server on 14 of 17 projects; 7.73x faster than Pyrefly, 3.22x faster than Zuban |
| OpenAI migration | Median 24x speedup and 73% lower peak memory usage vs their previous setup |
| PyPI downloads | 29x growth: 1.7M (Oct 2025) → 49.6M (Oct 2026) |
| Adoption audit | In a November audit of the 25,000 most-downloaded PyPI packages, 11.6% of repos with a type checker used ty — third behind mypy and Pyright. Among repos created in the last year: 22.6% used ty, 26.0% Pyright, 62.9% mypy |
| Conformance suite | 14 false positives and 13 false negatives, down from 224 and 405 at the Beta release (mypy: 190 and 109) |
The number that matters most to me is the last row of the adoption audit: among repositories created in the last year, nearly a quarter already use ty. New projects are choosing it at a rate that suggests it will be the default within a couple of years. And the conformance numbers matter too — 14 false positives versus mypy's 190 means fewer times the checker cries wolf, which is the thing that actually determines whether a team keeps a checker enabled.
Step 1: Install it
If you already use uv, this is one command:
uv tool install ty@latest
Or install the VS Code extension, which gives you the language server with diagnostics, completions, and navigation in the editor. That is the whole install. There is no daemon to configure, no plugin system to learn.
Check it works:
ty --version
Step 2: Run your first check
Point ty at a file or a project:
ty check
On a typed codebase, you will get a list of diagnostics. On an untyped one, you will get fewer than you expect — ty infers types from context even in lightly typed code, which is one of its more interesting behaviors.
Try this file, tasks.py. It has a bug that a surprising number of checkers miss:
from typing import TypedDict
class Task(TypedDict):
title: str
estimate_hours: float
def top_tasks(tasks: list[Task]) -> list[Task]:
ranked = sorted(
[*tasks, {"title": "Write docs", "estimate_hours": 2.5}],
key=lambda task: task["estimate_hour"], # typo: should be estimate_hours
)
return ranked[:3]
Run ty check tasks.py. Because of ty's bidirectional inference, it infers that the dictionary literal is a Task — just like the other entries — carries that type into the sort key, and flags the misspelled "estimate_hour", suggesting "estimate_hours". This is the exact class of bug the 1.0 announcement demonstrates with its own example: a typo inside a lambda, in a key lookup, on a value whose type only exists because of inference from the surrounding code. mypy and Pyright handle the simple cases; the point of the new generics solver and bidirectional inference in 1.0 is that ty handles the cases where the type has to flow backwards from how a value is used.
Step 3: See what it does with your real libraries
The 1.0 release ships built-in support for foundational Python libraries: Pydantic, Django, pytest, and attrs. That means ty understands what these libraries do at runtime, instead of treating them as black boxes.
Here is a Pydantic example — a backup job config where the field has an alias and a strict boolean:
from pathlib import Path
from pydantic import BaseModel, Field
class BackupJob(BaseModel):
destination: Path
compress: bool = Field(default=False, strict=True, alias="zip_it")
BackupJob(destination="./backups", zip_it=True) # OK
BackupJob(destination="./backups", zip_it="yes") # flagged: strict bool, "yes" is a str
BackupJob(destination="./backups", compress=True) # flagged: constructor expects zip_it
Three things happen here, all demonstrated in Astral's announcement with a near-identical example. ty accepts the path string because Pydantic converts it to a Path. It flags the string passed to the strict boolean field. And it warns about compress=True, because with an alias set, the constructor expects zip_it. If you use Pydantic heavily — and most Python backends do — this built-in understanding is worth more than raw speed. It is the difference between a checker that understands your code and one that just reads the annotations.
Step 4: Let it fix things for you
The 1.0 release adds ty check --fix, which applies safe automatic fixes. The announcement's example is a redundant cast:
import typing
def midpoint(start: int, end: int) -> int:
return typing.cast(int, start + end) // 2
Adding two integers already produces an int, so the cast is redundant. Running ty check --fix removes it and keeps the parentheses around the sum, preserving the order of operations. Small thing — but it is the kind of cleanup that makes a codebase feel maintained, and it runs in milliseconds across a whole project.
Step 5: Migrate an existing project without the big bang
This is the step most migration guides get wrong. They tell you to fix every error before enabling the checker, which means the migration never happens — nobody has a free week to fix 400 diagnostics.
ty gives you two escape hatches. The quick one:
ty check --add-ignore
This adds suppression comments to existing diagnostics in one pass, so you can start clean and fix them gradually.
The better one for teams is the diagnostic baseline, which is in preview in 1.0. Add it to your pyproject.toml:
[tool.ty]
baseline = "ty-baseline.json"
Then, from your project root on the main branch, run:
ty check --update-baseline
Commit the generated ty-baseline.json. From then on, CI flags only new errors — a new diagnostic in the same file still fails the check, but the old ones are recorded and tolerated while you work through them. Two caveats, both from Astral: the baseline format may change between releases while the feature is in preview, and ty's versioning policy allows minor releases to change checking behavior in ways that introduce new errors. So pin ty in CI and review checker upgrades alongside any baseline changes.
Here is a minimal GitHub Actions workflow that puts it together. The action pins use the exact SHAs from Astral's own uv documentation, because setup-uv publishes only full version tags since v8 — a floating @v10 tag does not resolve:
name: Type check
on: [push, pull_request]
jobs:
ty:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Install ty
run: uv tool install ty@1.0.0
- name: Check types
run: ty check
Pinning ty@1.0.0 instead of @latest is deliberate: it keeps CI reproducible, and you bump the version explicitly when you are ready to absorb new diagnostics.
Step 6: Type-check your scripts too
If you write standalone Python scripts with inline dependency metadata (PEP 723), ty 1.0 has a preview integration with uv: set project-manager.script = "uv" in your ty configuration, and ty prepares a separate environment per script so you can check a whole project and its scripts together, even when they need different Python versions or conflicting dependencies. The same integration powers completions and diagnostics for scripts in your editor.
A minimal PEP 723 script looks like this:
# /// script
# requires-python = ">=3.12"
# dependencies = ["httpx"]
# ///
import httpx
response = httpx.get("https://api.github.com/repos/astral-sh/ty")
print(response.json()["stargazers_count"])
With the uv integration enabled, ty check covers this file with its declared dependencies resolved — no more "works in the editor, fails in CI" for one-off scripts.
When not to switch (yet)
Honest caveats, because a 1.0 does not mean "right for everyone on day one":
- The baseline feature is in preview. Its file format can change. If you depend on it, pin your ty version and expect to regenerate the baseline on upgrades.
- Minor releases can add new diagnostics. Astral's versioning policy explicitly allows this. That is good for correctness long-term, but it means upgrades need a glance at the changelog, not a blind bump.
- mypy still has the bigger ecosystem. If your project relies on mypy plugins or deeply custom mypy configuration, check that ty covers your case before migrating. The conformance numbers are strong, but plugin compatibility is a different question.
- Type-aware features are still coming. Astral's roadmap mentions type-aware linting, dead-code elimination, and unused-dependency analysis — the payoff for ty's architecture — but those are future work, not 1.0 features.
None of these are reasons to avoid trying it. They are reasons to migrate with a baseline and a pinned version, which is how you should migrate to any tool.
Why this release matters beyond Python
There is a pattern here worth naming. Ruff replaced Flake8 and Black. uv replaced pip and poetry workflows. Each time, the story was the same: a Rust rewrite that was 10–100x faster, adopted first by new projects, then by everyone. ty is the third leg of that stool, and OpenAI running it as the default across millions of lines of production Python is the strongest possible signal that the transition is already happening.
If you maintain a Python codebase of any size, the cost of trying ty is fifteen minutes and one command. The cost of ignoring it is staying on a checker that takes minutes where ty takes seconds — and, increasingly, being the only project in the room still running the old one.
Sources
- ty 1.0: an extremely fast Python type checker and language server (Astral blog)
- Using uv in GitHub Actions (Astral docs — action pins)
- Switching to Astral ty 1.0 from mypy or Pyright in CI
- Astral releases ty 1.0, with a way to catch new Python type errors in CI
Have you tried ty yet — or are you still on mypy or Pyright? What would it take for you to switch: speed, fewer false positives, or something else entirely? Tell me in the comments.
Thanks for reading! I'm Shaswat Raj — I build CampusLoop, IndexFast, SopKit and open-source dev tools.
GitHub: https://github.com/playlikeboy/ · LinkedIn: https://www.linkedin.com/in/sh20raj/ · YouTube: https://youtube.com/@stackshade
Top comments (0)