Astral, the developer of high-performance Python tools including uv (package manager), Ruff (linter/formatter), and ty (type checker), has announced an experimental integration between uv and ty. The goal of this integration is to create a more cohesive toolchain where the tools share a unified understanding of a project's environment and dependencies. While each tool remains independently usable and interoperable with the broader ecosystem, the combined integration aims to unlock capabilities that neither tool can provide in isolation.

A graphic representing the integration of the uv and ty Python tools.
Astral's new integration brings the uv package manager and ty type checker into a unified toolchain.astral.sh

This image represents the core announcement of the experimental integration between Astral's uv and ty tools.

The integration specifically addresses challenges with PEP 723 scripts, which allow Python scripts to declare dependencies and version requirements through inline metadata. Previously, while uv could use this metadata to prepare environments, ty lacked a native way to automatically discover and check these scripts against their specific requirements. With the new integration, ty can now use uv to prepare the necessary environments for these scripts. This allows for accurate type checking, code navigation, and editor completions (such as hover information and 'Go to Definition') even when a script has different requirements than the surrounding project. In editors like VS Code, ty can now automatically invoke uv in the background to set up these environments.

Additionally, the update introduces a unified diagnostic interface via the 'uv check' command. Running 'uv check' will automatically prepare the project environment, install required dependencies, and execute ty to perform type checking. This command also supports workspace configurations, allowing users to check individual packages or all packages in a workspace using consistent syntax. For PEP 723 scripts, 'uv check --script' can be used to validate a script using its own declared requirements. While the integration is currently experimental and requires specific versions of uv (0.12.3+) and ty (0.0.76+), Astral plans to expand these capabilities to include linting via Ruff and new checks that combine uv's dependency knowledge with ty's code analysis to detect issues like unused dependencies.