feat: detect uv Python projects - #194
Open
QueryPlanner wants to merge 2 commits into
Open
Conversation
- Recognize uv.lock and pyproject.toml as Python project markers - Require regular marker files in direct cleanup - Preserve Python virtual environments and document cache scope - Test detection, cache cleanup, and retained project files
- Remove a redundant borrow rejected by Rust 1.98 Clippy - Preserve project-name output in CLI listings
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.
What
Add uv project detection using
uv.lockandpyproject.toml.Why
Python detection currently requires a
.pyfile at the project root. uv projects with source files in a subdirectory are missed, leaving root-level caches undiscovered.How
.venv, following the policy established in dont remove .venv for python #182.pyproject.toml, including files with[tool.uv], without adding a TOML parser or dependencies.Tests
cargo fmt --all -- --checkcargo clippy --tests --locked --offline -- -D warningscargo clippy -p kondo-lib --tests --locked --offline -- -D warningscargo test --all --locked --offline: 1 unit test and 4 integration tests pass.cargo build --locked --offline.venv..venv, ignores directory/symlink markers, and preserves all fixture contents.Local checks initially ran on macOS arm64 with Rust 1.96.0. After CI exposed a newer Clippy lint, validation was repeated with Rust 1.98.0, matching CI. The original failure was reproduced locally before the patch, and CLI dry-run output was compared before and after it. The workspace emits an existing future-compatibility warning for the transitive
blockdependency; all commands above pass.Related Issues
Closes #188.
The uv project layout is documented at https://docs.astral.sh/uv/concepts/projects/layout/.