The post has been translated automatically. Original language: Russian
On December 1, 2026, Astral, the author of the uv package manager and the Ruff linter, released ty 1.0, a type checking tool and language server for Python written in Rust. The main news of the release is that the developers now recommend ty for production to all users. In OpenAI, he has already become the main typechecker and checks many millions of lines of code.
What the transition to OpenAI showed
Astral provides the results of the internal migration of OpenAI: a median acceleration of verification by 24 times and a reduction in peak memory consumption by 73%. Ty also uses FastAPI and tox.
To compare the speed, we took not mypy and Pyright, but two other new typecheckers, Pyrefly and Zuban. Ty turned out to be the fastest in 16 cases on 18 open projects (cold start without cache): on average 1.46 times faster than Pyrefly and 3.56 times faster than Zuban. In terms of the speed of updating diagnostics in the editor after editing, ty was the first in 14 out of 17 projects.
Accuracy: fewer false positives
According to the official set of tests for compliance with the Python typing specification, ty has 14 false positives and 13 missed errors. At the beta stage, there were 224 and 405. For mypy, the same comparison shows 190 false positives and 109 misses.
There are also distribution figures. During the year from October 2025 to October 2026, ty downloads from PyPI increased from 1.7 million to 49.6 million. Among the repositories of 25 thousand of the most popular packages, where type checking is generally configured, ty is used by 11.6%: this is the third place after mypy and Pyright.
What's new in version 1.0
- A new generics inference mechanism and bidirectional type inference.
- Built-in support for Pydantic, Django, pytest, and attrs: no need for separate plugins.
- Output of returned types is enabled optionally via the analysis.return-type-inference parameter.
- Strict restriction of generics (also optional) and an unsound-return warning for unsafe returns.
- Auto-corrections via ty check --fix.
- Migration tools: ty check --add-ignore places the suppressions in the current code, and ty check --update-baseline saves the baseline to the ty-baseline.json file.
- Support for PEP 723 scripts in preview mode: uv collects its own environment for each script.
Installed by the uv tool install ty@latest command, there is an extension for VS Code. The plans include linting based on types, searching for dead code and unused dependencies, and selecting tests based on changes.
What does this mean in practice?
For a backend team on Django or FastAPI, this is an excuse to at least run ty on your code. Built-in Django and Pydantic support removes the main pain of mypy with its plugins and slow runs in CI.
It is better to move gradually. First, run ty next to the current time checker and compare the reports. Then fix the baseline so that CI falls only on new errors, and not on hundreds of old ones. Keep in mind that ty behaves differently in non-annotated code: in some cases it is stricter than mypy, in others it is softer, and strict modes are enabled separately. Therefore, a one-to-one replacement can break the assembly and skip what was previously caught.
There is no versioning policy or compatibility promises in the announcement: Astral only talks about weekly improvements. This means that the CI version should be fixed and updated consciously, checking the report after each update.
The draft text was prepared with the participation of AI, the facts are checked against the original source — the official blog of Astral, ty 1.0 announcement
1 декабря 2026 года компания Astral, автор менеджера пакетов uv и линтера Ruff, выпустила ty 1.0 — инструмент проверки типов и языковой сервер для Python, написанный на Rust. Главная новость релиза в том, что разработчики теперь рекомендуют ty для продакшена всем пользователям. В OpenAI он уже стал основным тайпчекером и проверяет многие миллионы строк кода.
Что показал переход в OpenAI
Astral приводит результаты внутренней миграции OpenAI: медианное ускорение проверки в 24 раза и снижение пикового потребления памяти на 73%. Ещё ty используют FastAPI и tox.
Для сравнения скорости взяли не mypy и Pyright, а два других новых тайпчекера, Pyrefly и Zuban. На 18 открытых проектах (холодный запуск без кеша) ty оказался быстрее всех в 16 случаях: в среднем в 1,46 раза быстрее Pyrefly и в 3,56 раза быстрее Zuban. По скорости обновления диагностики в редакторе после правки ty был первым в 14 проектах из 17.
Точность: меньше ложных срабатываний
По официальному набору тестов на соответствие спецификации типизации Python у ty 14 ложных срабатываний и 13 пропущенных ошибок. На стадии беты было 224 и 405. Для mypy в том же сравнении указаны 190 ложных срабатываний и 109 пропусков.
Есть и цифры по распространению. За год, с октября 2025 по октябрь 2026, загрузки ty из PyPI выросли с 1,7 млн до 49,6 млн. Среди репозиториев 25 тысяч самых популярных пакетов, где вообще настроена проверка типов, ty используют 11,6%: это третье место после mypy и Pyright.
Что нового в версии 1.0
- Новый механизм вывода дженериков и двунаправленный вывод типов.
- Встроенная поддержка Pydantic, Django, pytest и attrs: не нужны отдельные плагины.
- Вывод возвращаемых типов, включается по желанию через параметр analysis.return-type-inference.
- Строгое сужение дженериков (тоже по желанию) и предупреждение unsound-return для небезопасных возвратов.
- Автоисправления через ty check --fix.
- Инструменты миграции: ty check --add-ignore расставляет подавления в текущем коде, а ty check --update-baseline сохраняет базовую линию в файл ty-baseline.json.
- Поддержка скриптов по PEP 723 в режиме preview: для каждого скрипта uv собирает своё окружение.
Ставится командой uv tool install ty@latest, для VS Code есть расширение. В планах — линтинг с учётом типов, поиск мёртвого кода и неиспользуемых зависимостей, выбор тестов по изменениям.
Что это значит на практике
Для backend-команды на Django или FastAPI это повод хотя бы прогнать ty на своём коде. Встроенная поддержка Django и Pydantic снимает главную боль mypy с его плагинами и медленными прогонами в CI.
Переходить лучше постепенно. Сначала запустите ty рядом с текущим тайпчекером и сравните отчёты. Потом зафиксируйте базовую линию, чтобы CI падал только на новых ошибках, а не на сотнях старых. Учтите, что ty по-другому ведёт себя на непокрытом аннотациями коде: где-то он строже mypy, где-то мягче, а строгие режимы включаются отдельно. Поэтому замена «один в один» может и сломать сборку, и пропустить то, что раньше ловилось.
В анонсе нет политики версионирования и обещаний по совместимости: Astral говорит только о еженедельных улучшениях. Значит, версию в CI стоит закрепить и обновлять осознанно, проверяя отчёт после каждого обновления.
Черновик текста подготовлен с участием ИИ, факты сверены с первоисточником — официальный блог компании Astral, анонс ty 1.0
Comments 1
Newest Popular