🎨 Explicitly pass multiple arguments - #7
Open
davnn wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates uv-pack’s CLI forwarding options (--uv-export, --pip-download, --uv-build) to accept repeated values and forward them as explicit argv tokens (instead of whitespace-splitting a single string), avoiding ambiguity and breakage when forwarded arguments contain whitespace (e.g., paths).
Changes:
- Change internal subprocess helpers to accept
other_args: list[str]and append them directly to the command argv. - Update CLI option types to
list[str](repeatable options) and adjust test Taskfile examples accordingly. - Refresh README and build-system dependency constraint to reflect the new usage.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Taskfile.yaml | Updates test invocations to use the new explicit forwarded-arg form. |
| src/uv_pack/_export.py | Switches forwarded args from a split string to an explicit list[str] argv extension for uv export. |
| src/uv_pack/_download.py | Switches forwarded args from a split string to an explicit list[str] argv extension for pip download. |
| src/uv_pack/_build.py | Switches forwarded args from a split string to an explicit list[str] argv extension for uv build. |
| src/uv_pack/init.py | Changes Typer options to repeatable lists and updates help text for the new semantics. |
| README.md | Updates CLI docs and adds an “Extra arguments” section demonstrating repeated options. |
| pyproject.toml | Adds an upper bound to uv_build in the build-system requirements. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+89
to
+90
| The quoted form is also valid, for example `--uv-export "--locked"`, but the | ||
| examples in this README use the `--option=value` form. |
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.
Description
Arguments were previously supplied as
--uv-export "--dev --locked"and were whitespace-split, but this could lead to problems with arguments that use whitespace, e.g. paths. The new implementation is more explicit requiring--uv-export=--dev --uv-export=--lockedsupporting more complex argument inputs.Related Issue
Type of Change
Checklist
task check.pre-commit.