2.4 KiB
2.4 KiB
Astral ty Usage Reference
Use this page when you want to run or adopt ty, Astral's Python type checker and language server, in a typing-focused workflow.
Quick Start
- Run a one-off check without installing globally:
uvx ty check - Run checks in the current project:
ty check - Explore behavior quickly in the ty playground
Primary docs:
Editor Integration
Use ty as a language server in supported editors.
Configuration Surface
Start from project defaults, then add targeted overrides only where needed.
- Configuration guide
- Configuration reference
- Python version handling
- Module discovery
- File exclusions
Rule And Suppression Controls
Use this set when tuning signal-to-noise in large or partially typed codebases.
Migration Notes
For teams moving from existing type checkers, use Astral's migration guidance first.
Suggested Review Flow With ty
- Confirm Python baseline and project targets.
- Run
uvx ty checkfor an initial signal pass. - Configure version/module/discovery settings as needed.
- Triage diagnostics and tune rules or suppressions deliberately.
- Re-run checks and keep modernization changes behavior-preserving unless explicitly requested.