| name | python-ty |
| description | Fast Python type checking with ty (by Astral). Use when checking Python types, running type checks in CI, or setting up type checking for Python projects. Triggers on "type check", "ty check", "python types", or type error debugging. |
Python Type Checking with ty
ty is an extremely fast Python type checker from Astral (makers of Ruff).
Quick Start
uvx ty check
uvx ty check src/ tests/
Installation (Optional)
uv tool install ty@latest
uv tool upgrade ty
Common Tasks
ty check --watch
ty check --python-version 3.11
ty check --format concise
ty check --exclude "**/test_*.py"
Configuration File
Create ty.toml in project root (auto-discovered):
python-version = "3.11"
exclude = ["**/test_*.py", "**/__pycache__/**"]
format = "concise"
CI/CD
ty check --error all --error-on-warning --no-progress
Exit codes: 0 = success, 1 = errors found, 2 = internal error
Advanced Options
Severity Control
ty check --error all
ty check --warn typing
ty check --ignore unused
Environment Targeting
ty check --python /path/to/python
ty check --venv /path/to/venv
ty check --python-platform linux
ty check --extra-search-path ./stubs/
Output Formats
ty check --format full
ty check --format concise
ty check --format github
ty check --format gitlab
ty check --color never
ty check --no-progress
ty check -v
ty check -q
Other Commands
ty server
ty version
ty generate-shell-completion zsh