ty README

The project's README from github.com/astral-sh/ty. As one markdown file: README.md.

ty

ty PyPI Discord

An extremely fast Python type checker and language server, written in Rust.


Shows a bar chart with benchmark results.

Type checking the home-assistant project without caching.


ty is backed by Astral, the creators of uv and Ruff.

ty is currently in beta.

Highlights

Getting started

Run ty with uvx to get started quickly:

uvx ty check

Or, check out the ty playground to try it out in your browser.

To learn more about using ty, see the documentation.

Installation

To install ty, see the installation documentation.

To add the ty language server to your editor, see the editor integration guide.

Getting help

If you have questions or want to report a bug, please open an issue in this repository.

You may also join our Discord server.

Contributing

Development of this project takes place in the Ruff repository at this time. Please open pull requests there for changes to anything in the ruff submodule (which includes all of the Rust source code).

See the contributing guide for more details.

Version policy

ty uses 0.0.x versioning. ty does not yet have a stable API; breaking changes, including changes to diagnostics, may occur between any two versions. See the type system support tracking issue for a detailed overview of currently supported features.

For information on the timeline, you can check out the Stable milestone.

FAQ

Which Python versions does ty support?

ty officially supports type checking code that targets Python 3.10 and later. Earlier versions (Python 3.7 through 3.9) can still be selected, but may result in false negatives or false positives due to a lack of bundled standard library stubs.

The target version is independent of the Python version used to install ty. For example, ty installed from PyPI using Python 3.8 or later can type check code targeting Python 3.7; the standalone installer does not require Python at all.

Why is ty doing _____?

See our typing FAQ.

How do you pronounce ty?

It's pronounced as "tee - why" (/tiː waɪ/)

How should I stylize ty?

Just "ty", please.

License

ty is licensed under the MIT license (LICENSE or https://opensource.org/licenses/MIT).

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in ty by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.

Made by Astral

ty (astral-sh/ty)

Searching Database…

19.9K ·GitHub
Что это такое?ty — чрезвычайно быстрый инструмент проверки типов для Python и языковой сервер, написанный на Rust командой Astral (той же, что создала uv и Ruff). Сейчас проект находится в бета-версии.
Мне импортировать ty как библиотеку Python или запускать его отдельно?ty — это не пакет Python, который импортируется в код. Это самостоятельная консольная утилита для проверки типов и языковой сервер (LSP), к которому подключаются редакторы вроде VS Code, PyCharm и Neovim.
Как запустить ty?Самый быстрый способ — выполнить `uvx ty`: инструмент сам загрузится и запустится без отдельной установки. Также можно попробовать ty в браузере на специальной песочнице, ничего не устанавливая.
Нужен ли мне установленный Python, чтобы пользоваться ty?Не обязательно: автономный установщик не требует Python вообще. Версия Python, которой устанавливается ty, также не связана с версией Python, для которой выполняется проверка типов.
Достаточно ли ty стабилен для использования в продакшене?Пока нет: ty использует версионирование 0.0.x и не имеет стабильного API, поэтому между любыми двумя версиями могут появиться несовместимые изменения, в том числе в формате диагностик.
Насколько ty быстрее mypy или Pyright?По заявлению проекта, ty примерно в 10–100 раз быстрее mypy и Pyright, что во многом обеспечивается написанием на Rust и инкрементальным анализом с мелкой детализацией.
Почему разработка ty ведётся в репозитории Ruff?Исходный код ty на Rust находится в виде подмодуля внутри репозитория Ruff, поэтому пул-реквесты, затрагивающие основной проверяющий модуль, открываются именно там, а не в самом репозитории ty.
Как произносится «ty»?Произносится как «тай-уай» (/tiːwaɪ/), а сам проект просит писать название просто как «ty».
What are similar projects?uv, ts-rust, helix, rust-analyzer, sapling, LunarVim, YouCompleteMe, ruff
Creator
astral-sh
Size
5 MB
Stars
19.9K
Age
1y
Commits · 90 Days