mypy-to-ty
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
/migration-patterns:mypy-to-ty
Migrate from mypy to ty — Astral's new fast Python type checker. Replaces the mirrors-mypy pre-commit hook with a local repo: local hook using uvx ty check, migrates config from [tool.mypy] to [tool.ty], and removes mypy.ini.
When to Use This Skill
| Use this skill when... | Keep mypy when... |
|---|---|
.pre-commit-config.yaml contains mirrors-mypy |
ty does not yet support a specific mypy plugin you rely on |
[tool.mypy] section exists in pyproject.toml |
CI pipeline depends on mypy-specific exit codes or plugins |
| You want faster type checking (ty is written in Rust) | Project uses mypy daemon (dmypy) for incremental checks |
| Repo uses uv and the astral stack already | Team prefers mypy's error message format |
Context
- Pre-commit config: !
find . -maxdepth 1 -name '.pre-commit-config.yaml' - pyproject.toml: !
find . -maxdepth 1 -name 'pyproject.toml' - mypy.ini: !
find . -maxdepth 1 -name 'mypy.ini' - uv available: !
find . -maxdepth 1 -name 'uv.lock'