ty-type-checking
БесплатноБез исполняемых скриптовНе проверенty: Astral's extremely fast Python type checker (mypy/Pyright alternative). Use when checking Python types or setting up type checking. Triggers: ty, mypy…
от laurigates★ 61 звезда на GitHubОб этом скилле
ty Type Checking
Expert knowledge for using ty as an extremely fast Python type checker from Astral (creators of uv and ruff).
When to Use This Skill
| Use this skill when... | Use basedpyright instead when... | Use mypy instead when... |
|---|---|---|
| Want fastest type checking (10-100x faster) | Need strictest defaults out of box | Need extensive plugin ecosystem |
| Using Astral toolchain (uv, ruff) | Want Microsoft-backed alternative | Have legacy mypy configuration |
| Need excellent diagnostics | Need Pylance compatibility | Require mypy-specific plugins |
| Want incremental/watch mode | Team prefers Pyright conventions | Need Django/Pydantic mypy plugins |
| Setting up new Python project | Already using basedpyright | Existing mypy expertise |
Core Expertise
ty Advantages
- Extremely fast (10-100x faster than mypy and Pyright)
- Written in Rust for performance
- Best-in-class diagnostic messages inspired by Rust compiler
- Incremental analysis optimized for IDE workflows
- Built-in LSP for editor integration
- First-class intersection types
- Advanced type narrowing and reachability analysis
- Part of Astral ecosystem (uv, ruff)
Installation
Via uv (Recommended)
# Install globally as tool
uv tool install ty@latest
# Run without installing
uvx ty check
# Install as dev dependency
uv add --dev ty
Via pip
pip install ty
VS Code Extension
Install the astral-sh.ty extension from the VS Code marketplace.
Basic Usage
Type Checking
# Check current directory
ty check
# Check specific files or directories
ty check src/
ty check src/ tests/
ty check path/to/file.py
# Verbose output
ty check --verbose
# Hide progress indicators
ty check --hide-progress
Output Control
# Default output with diagnostics
ty check
# Hide progress spinners (useful for CI)
ty check --hide-progress
# Verbose mode for debugging
ty check --verbose
Configuration
pyproject.toml
[tool.ty]
# Python version targeting
python-version = "3.12"
# Files to exclude
exclude = [
"**/__pycache__",
"**/.venv",
"**/node_modules",
"tests/fixtures/**",
]
[tool.ty.rules]
# Configure rule severity: "error", "warn", or "ignore"
index-out-of-bounds = "error"
possibly-unbound = "warn"
unknown-type = "ignore"
ty.toml (standalone)
# ty.toml takes precedence over pyproject.toml
python-version = "3.12"
exclude = [
"**/__pycache__",
"**/.venv",
]
[rules]
index-out-of-bounds = "error"
possibly-unbound = "warn"
Configuration Hierarchy
- Command-line arguments (highest priority)
ty.tomlin current directorypyproject.toml[tool.ty]section- User config:
~/.config/ty/ty.toml(Linux) or%APPDATA%\ty\ty.toml(Windows) - ty defaults (lowest priority)
CLI Options
Core Options
| Flag | Description |
|---|---|
--python <VERSION> |
Python environment/version to use |
--project <PATH> |
Run within given project directory |
--config <PATH> |
Path to ty.toml configuration file |
--verbose |
Enable verbose output |
--hide-progress |
Hide progress spinners/bars |
Rule Configuration
| Flag | Description |
|---|---|
--error <RULE> |
Treat rule as error severity |
--warn <RULE> |
Treat rule as warning severity |
--ignore <RULE> |
Ignore rule completely |
File Selection
| Flag | Description |
|---|---|
--exclude <PATTERN> |
Glob patterns for files to exclude |
--respect-ignore-files |
Respect .gitignore (default) |
--no-respect-ignore-files |
Ignore .gitignore files |
Editor Integration
VS Code
- Install extension:
astral-sh.ty - ty provides LSP with:
- Real-time type checking
- Go to Definition
- Auto-complete with type hints
- Auto-import suggestions
- Rename symbol
- Inlay hints
- Semantic highlighting
Neovim
-- Using nvim-lspconfig
require("lspconfig").ty.setup({
settings = {
ty = {
-- Configuration options
}
}
})
PyCharm
ty provides a PyCharm plugin for IDE integration.
CI Integration
GitHub Actions
name: Type Check
on: [push, pull_request]
jobs:
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install uv
uses: astral-sh/[email protected]
with:
enable-cache: true
- name: Run ty
run: uvx ty check --hide-progress
Pre-commit Hook
# .pre-commit-config.yaml
repos:
- repo: https://github.com/astral-sh/ty
rev: 0.0.111
hooks:
- id: ty
GitLab CI
ty-check:
stage: test
image: python:3.12
before_script:
- pip install ty
script:
- ty check --hide-progress
Common Patterns
Quick Type Check
# Fast check of current project
ty check
# Chec
Установить ty-type-checking в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(ty *)Bash(python *)Bash(uv *)ReadEditWriteGrepGlobTodoWriteFAQ
Что делает скилл ty-type-checking?
ty: Astral's extremely fast Python type checker (mypy/Pyright alternative). Use when checking Python types or setting up type checking. Triggers: ty, mypy alternative.
Как установить скилл ty-type-checking?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ty-type-checking запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic