You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use ty to check Python scripts (with no third-party dependencies) in a non-Python project. Currently, ty-pre-commit fails if pyproject.toml does not exist:
ty.......................................................................Failed
- hook id: ty
- exit code: 1
warning[uv-metadata]: `uv workspace metadata` failed with status exit status: 2: error: No `pyproject.toml` found in current directory or any parent directory
Found 1 diagnostic
Note that ty itself does not require pyproject.toml.
Configuration:
- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.81
hooks:
- id: ty
Thanks for the report. It looks like this behaviour changed in ty 0.0.76; ty now has a hard error on failing uv workspace metadata calls when TY_UV=1 is set as an environment variable (that environment variable signals to ty that it should "activate its uv integration"). uv check sets that environment variable unconditionally, and this pre-commit hook invokes uv check.
We're discussing internally what the best solution here might be.
Activity
AlexWaygood commentedon Sep 17, 2026
Thanks for the report. It looks like this behaviour changed in ty 0.0.76; ty now has a hard error on failing
uv workspace metadatacalls whenTY_UV=1is set as an environment variable (that environment variable signals to ty that it should "activate its uv integration").uv checksets that environment variable unconditionally, and this pre-commit hook invokesuv check.We're discussing internally what the best solution here might be.
AlexWaygood commentedon Sep 17, 2026
Thanks again for the report. This will be fixed in the first ty release that comes after the next uv release.