ty-migrate CLI Automates Moving Python Projects from mypy and Pyright to Astral's ty

A developer has released ty-migrate, a zero-dependency Python 3.11+ command-line tool on PyPI that automates switching from mypy or Pyright/Basedpyright to Astral's ty type checker. It converts configuration files such as mypy.ini, setup.cfg, and pyrightconfig.json into ty's [tool.ty.*] settings, and maps per-module overrides and error rules to ty's equivalents. The tool also rewrites legacy type-ignore comments using Python's tokenize module so docstrings and string literals are left unchanged. A --report option lists which settings were translated, which need manual guidance, and which are unmapped, while --check returns exit code 3 in CI when manual review is needed. The project is hosted on GitHub, and the author invites users to report unmapped error codes or edge cases.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in