NewsCrawler.org

Astral launches experimental uv-ty integration with a unified uv check command

Astral announced an experimental, preview-stage integration between uv, its Python package manager, and ty, its type checker and language server[1]. ty now reads the PEP 723[2] inline metadata that lets a Python script declare its own dependencies and Python version, and invokes uv to prepare an environment for each script, so editor completions, navigation and type checking match what the script itself requires. A new uv check command prepares the project environment and runs ty, with per-package and whole-workspace options, a --script flag for standalone scripts, and a ty version taken from the project's lockfile[3]; Ruff support is planned so linting and type checking can share one command. Automatic environment setup is opt-in because installing dependencies can execute third-party Python code, and the features require uv 0.12.3 or later and ty 0.0.76 or later. Astral plans to enable script support by default, add checks that combine dependency and code knowledge such as detecting unused dependencies, and continue toward ty's stable release.

Read the original astral.shDiscussion

Discussion

Commenters are split: some welcome proper editor support for PEP 723 scripts and type checking built into the package manager, while others find the CLI fragmented, would rather keep ty standalone or pair it with Ruff, and suspect Astral is folding ty into its popular tool after losing ground to Meta's Pyrefly. One commenter dislikes ty's gradual typing[4] and wants unknown types reported as errors, and another says ty's hesitant support of Django's quirks outweighs the benefits for them.

Sources

Published: First seen: Читать по-русски

Open as a page