[ty] Skip implicitly discovered PEP 723 scripts in uv workspaces - #27165
Closed
Gankra wants to merge 1 commit into
Closed
[ty] Skip implicitly discovered PEP 723 scripts in uv workspaces#27165Gankra wants to merge 1 commit into
Gankra wants to merge 1 commit into
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 96.84%. The percentage of expected errors that received a diagnostic held steady at 92.11%. The number of fully passing files held steady at 99/133. |
Memory usage reportMemory usage unchanged ✅ |
|
Member
|
This is great! |
This was referenced Jul 24, 2026
Gankra
added a commit
that referenced
this pull request
Jul 24, 2026
This is a 3rd pseudo-alternative to * astral-sh/uv#20676 * #27165 which @MichaReiser suggested as a way to ask for the desired behaviour that becomes "standard API" and not like, some random "oh are we doing uv?" escape-hatch. Notably here a PEP 723 script is only excluded if it's "implicitly selected" in much the same way that this still checks `bar.py`: `ty check --exclude foo/ -- foo/bar.py` `--include-scripts` is the default and exists only to negate `--exclude-scripts` in e.g. config-vs-cli-arg fights (and maybe will be nice if we ever change the default).
Member
|
I'd prefer #27169 |
Contributor
Author
|
Closing in favour of astral-sh/uv#20676 which can be simplified with #27169 but doesn't strictly need to block on it. |
Gankra
added a commit
to astral-sh/uv
that referenced
this pull request
Jul 27, 2026
…20676) This is an alternative version of astral-sh/ruff#27165 where all the logic lives in uv and ty can keep its innocence. As mentioned in that PR, with this "full" uv check thus looks like: ```sh #!/usr/bin/env bash set -uo pipefail status=0 uv check --all-packages --all-groups --all-extras || status=1 while IFS= read -r script; do uv check --script "$script" || status=1 done < <(uv workspace list --scripts) exit "$status" ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #25551 this is a followup to force ty to ignore pep 723 scripts that "happen" to be discovered under a package that it was told to use by
uv check.Thus to check any scripts with
uv checkyou must useuv check --script path/to/script.py(and users can get the list of paths to do that for withuv workspace list --scripts)."Full"
uv checkthus looks like:In the future we may or may not add more optimized UX for this, but this reflects the way uv thinks about package/script selection.