Files
prompts/docs/skills/python-typing/references/astral-ty.md
T

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.

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

  1. Confirm Python baseline and project targets.
  2. Run uvx ty check for an initial signal pass.
  3. Configure version/module/discovery settings as needed.
  4. Triage diagnostics and tune rules or suppressions deliberately.
  5. Re-run checks and keep modernization changes behavior-preserving unless explicitly requested.