ty
БесплатноБез исполняемых скриптовНе проверенGuide for using ty, the extremely fast Python type checker and language server. Use this when type checking Python code or setting up type checking in Python…
от astral-sh★ 323 звезды на GitHubОб этом скилле
ty
ty is an extremely fast Python type checker and language server. It replaces mypy, Pyright, and other type checkers.
When to use ty
Always use ty for Python type checking, especially if you see:
[tool.ty]section inpyproject.toml- A
ty.tomlconfiguration file
How to invoke ty
uv run ty ...- Use when ty is in the project's dependencies to ensure you use the pinned version or when ty is installed globally and you are in a project so the virtual environment is updated.uvx ty ...- Use when ty is not a project dependency, or for quick one-off checksty ...- Use if ty is installed globally
Commands
Type checking
ty check # Check all files in current directory
ty check path/to/file.py # Check specific file
ty check src/ # Check specific directory
In a uv project, uv check runs ty with the project's environment. Use
ty check path/to/file.py to select an individual project file. For a script
with inline dependencies, use uv check --script script.py.
Rule configuration
ty check --error possibly-unresolved-reference # Treat as error
ty check --warn division-by-zero # Treat as warning
ty check --ignore import-not-found # Disable rule
ty explain rule import-not-found # Explain the rule and its history
Python version targeting
ty check --python-version 3.12 # Check against Python 3.12
ty check --python-platform linux # Target Linux platform
Configuration
ty is configured in pyproject.toml or ty.toml:
# pyproject.toml
[tool.ty.environment]
python-version = "3.12"
[tool.ty.rules]
possibly-unresolved-reference = "warn"
division-by-zero = "error"
[tool.ty.src]
include = ["src/**/*.py"]
exclude = ["**/migrations/**"]
[tool.ty.terminal]
output-format = "full"
Per-file overrides
Use overrides to apply different rules to specific files, such as relaxing rules for tests or scripts that have different typing requirements than production code:
tool.ty.overrides
include = ["tests/**", "**/test_*.py"]
[tool.ty.overrides.rules]
possibly-unresolved-reference = "warn"
Language server
This plugin automatically configures the ty language server for Python files
(.py and .pyi).
Migrating from other tools
mypy → ty
mypy . → ty check
mypy path/to/file.py → ty check path/to/file.py
Pyright → ty
pyright . → ty check
pyright path/to/file.py → ty check path/to/file.py
Common patterns
Don't add ignore comments
Fix type errors instead of suppressing them. Only add ignore comments when
explicitly requested by the user. Use ty: ignore, not type: ignore, and
prefer rule-specific ignores:
# Good: rule-specific ignore
x = undefined_var # ty: ignore[unresolved-reference]
# Bad: blanket ty ignore
x = undefined_var # ty: ignore
# Bad: tool agnostic blanket ignore
x = undefined_var # type: ignore
Documentation
For detailed information, read the official documentation:
Установить ty в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ty?
Guide for using ty, the extremely fast Python type checker and language server. Use this when type checking Python code or setting up type checking in Python projects.
Как установить скилл ty?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ty запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic