Astral releases the first stable edition of its Python type checker
US software company Astral has released the first stable version of ty, a tool that checks whether Python code follows type rules. It can run from a command line or feed up-to-date information to a code editor. The stable release adds built-in support for several widely used Python tools and improves how it infers type parameters.
Artificial Intelligence··Midday
AI image
Ty runs in a terminal and can serve code editors
US software company Astral released the first stable version of ty, a tool for checking Python code against type rules. Astral wrote the tool in Rust. Developers can run the checks from a terminal. Ty also includes a language server, a program that gives a code editor information about the code as it changes. Astral also develops the uv package manager and the Ruff code checker.[1], [2]
The stable release recognizes widely used Python tools
The stable release improves the inference of type parameters, which helps ty work out some types developers leave implicit. Astral has also added built-in support for Pydantic, Django, pytest and attrs, tools used for tasks ranging from validating data to testing software. Astral offers a ty extension for the Visual Studio Code editor.[1], [2]
Teams can keep track of problems during a gradual switch
A team moving an existing project to ty can save the diagnostics it already has in a separate file and continue to see notices about new issues. Astral says ty recalculates the information affected by a changed file and reuses results that still apply. The company says FastAPI and tox were among the projects that adopted the checker while it was in beta.[1]