TL;DR
Get audio and creator gear delivered free with Prime
- Fast, free delivery on millions of items
- Prime Video, Amazon Music and more included
- Member-only deals all year
Astral has released an experimental integration connecting uv, its Python package manager, with ty, its type checker and language server. The preview supports PEP 723 script environments and adds uv check, which prepares project dependencies and runs ty. The integration is opt-in for editor-based script setup, and Ruff support is planned rather than available now.
Astral has announced an experimental integration between uv, its Python package manager, and ty, its type checker and language server, connecting project environment setup with code analysis. The preview adds type-checking support for Python scripts that declare dependencies inline and introduces uv check, a command that prepares an environment and runs ty.
For scripts using PEP 723 inline metadata, ty can read each script’s declared Python version and dependencies and ask uv to prepare a matching environment. Astral says this works through the command line and in supported editor features. Different scripts in one repository can be checked against different dependency declarations rather than being forced to use the surrounding project’s environment.
The editor integration can provide type checking, completions, hover information and Go to Definition based on a script’s requirements. Astral says automatic setup in the editor is currently opt-in because preparing an environment can install dependencies, and installing them can involve executing third-party Python code. In VS Code, the report says users need uv, the ty extension and the setting ty.experimental.useUv enabled.
The new uv check command is the second part of the preview. It uses project or workspace configuration to prepare dependencies and run ty; it can check a workspace, a selected package, all packages, or a standalone script with the appropriate option. Astral says uv check uses the ty version recorded in the project’s lockfile. The feature requires uv 0.12.3 or later and ty 0.0.76 or later, according to the announcement.
One Command for Environment and Types
The integration addresses a common separation in Python development: developers manage dependencies in one tool and configure checks in another. With uv check, Astral aims to make a project-aware type check run from the same configuration that describes the project environment. That can reduce the need for users or continuous-integration workflows to set up a separate ty version and environment manually.
Script support also matters for code that does not belong to a conventional packaged project. PEP 723 lets a standalone script declare what it needs, and ty can use those declarations for analysis. Astral’s report says scripts in the same repository can carry separate Python and dependency requirements, which may make editor assistance more consistent with how each script is actually run.
The broader implication remains a direction, not a delivered set of features: Astral describes an integrated toolchain in which its tools can share project information. The current preview connects uv with ty. Ruff is not yet part of uv check; Astral says it plans to add support later, which could bring linting and type checking into the same command if implemented.
Python programming book type checking and static typing
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Astral develops uv, Ruff and ty for Python development. In the announcement, the company describes uv as its package manager, Ruff as its linter and formatter, and ty as its type checker and language server. The new integration is framed as an effort to make these tools work together while remaining individually usable and interoperable with the wider Python ecosystem.
PEP 723 provides a standard way for Python scripts to record dependency and Python-version requirements in inline metadata. Astral says uv already uses that metadata to prepare a script’s environment; the preview extends the information to ty, so the type checker can analyze a script against its own declared requirements. At the project level, uv workspace metadata supplies ty with information about packages, dependencies and Python environments.
The announcement presents this as an early stage. Astral says the integration is experimental and that it plans to make script support available by default over time, as well as to support automatic environment setup for standard Python projects. Those are stated plans, not features the report says are already enabled by default.
“This integration is experimental, and we’d love your feedback as we refine the experience.”
— Astral, in its announcement
Python development environment setup guide uv package manager
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Preview Limits and Security Tradeoffs
The announcement does not specify when the integration will leave experimental status, when script support may become enabled by default, or when automatic setup for standard projects will arrive. Astral also does not provide performance figures or results from a broader evaluation, so the report does not establish how the integration performs across different project sizes or workflows.
Environment preparation may install declared packages, and Astral notes that dependency installation can execute third-party Python code. For that reason, automatic editor environment setup is opt-in for the described script workflow. Users should be aware of that behavior before enabling it. The announcement does not describe additional safeguards or a detailed security review process.
Finally, uv check currently supports ty, not Ruff. Astral says Ruff integration is planned, but provides no release date. The company also refers to future checks such as detecting unused dependencies as work in progress, not an available capability.
Visual Studio Code Python development extensions guide
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Feedback and Planned Toolchain Work
Astral is asking users to try the preview and provide feedback as it refines the experience. The announcement describes two ways to start: enable the uv integration in the ty VS Code extension for editor support, or run uv check for project checks. It says the editor route requires the specified uv and ty versions and that command-line checks can also target PEP 723 scripts.
Astral says it plans to expand uv check to Ruff, and to make script support and automatic environment setup more broadly available over time. It has not announced dates for those changes. Separately, it says it is continuing work toward a stable release of ty and developing checks that combine dependency information with code analysis. Those milestones remain future work; users should treat the current integration as experimental.
Python scripting and automation book
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
What is the uv-ty integration?
It is an experimental connection between uv, Astral’s Python package manager, and ty, its type checker and language server. It lets ty use uv-managed project and script environments for checking code.
What does uv check do?
uv check prepares the relevant project environment and runs ty. Astral says it can target a project, workspace packages or a standalone script, and uses the ty version recorded in the project lockfile.
Can ty check standalone Python scripts?
Yes. For scripts with PEP 723 metadata, ty can use the declared Python version and dependencies to check the script against its own requirements. Astral says this is supported from the command line and through editor features when the integration is enabled.
Is Ruff included in uv check now?
No. The announcement says uv check currently supports ty. Astral plans to add Ruff support, but did not give a release date.
Why is editor setup opt-in?
Astral says preparing an environment can install declared dependencies, and dependency installation can execute third-party Python code. The company has therefore made automatic environment setup for the described editor script workflow opt-in.
Source: hn
Halloween Picks
halloween
As an affiliate, we earn on qualifying purchases.
