Skip to content

Commit

Permalink
Unhide --isolated global argument (#5005)
Browse files Browse the repository at this point in the history
## Summary

This PR makes the `--isolated` global argument visible, previously it
was hidden.
Fixes #4981.

## Test Plan

I ran `cargo run -- help` to verify `--isolated` was visible and it is.
I ran clippy with `cargo clippy --workspace --all-targets --all-features
--locked -- -D warnings` as CI does.

I also ran tests locally with:
```
cargo nextest run \
            --features python-patch \
            --workspace \
            --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow
```
  • Loading branch information
silvanocerza committed Jul 12, 2024
1 parent 8d6c49b commit 663c190
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub struct GlobalArgs {

/// Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
/// parent directories.
#[arg(global = true, long, hide = true)]
#[arg(global = true, long)]
pub isolated: bool,

/// Show the resolved settings for the current command.
Expand Down
26 changes: 26 additions & 0 deletions crates/uv/tests/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ fn help() {
--python-fetch <PYTHON_FETCH>
Whether to automatically download Python when required [possible values: automatic,
manual]
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache [env: UV_NO_CACHE=]
--cache-dir [CACHE_DIR]
Expand Down Expand Up @@ -98,6 +101,9 @@ fn help_flag() {
--python-fetch <PYTHON_FETCH>
Whether to automatically download Python when required [possible values: automatic,
manual]
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache [env: UV_NO_CACHE=]
--cache-dir [CACHE_DIR]
Expand Down Expand Up @@ -153,6 +159,9 @@ fn help_short_flag() {
--python-fetch <PYTHON_FETCH>
Whether to automatically download Python when required [possible values: automatic,
manual]
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache [env: UV_NO_CACHE=]
--cache-dir [CACHE_DIR]
Expand Down Expand Up @@ -249,6 +258,10 @@ fn help_subcommand() {
- manual: Do not automatically fetch managed Python installations; require explicit
installation
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache
Expand Down Expand Up @@ -362,6 +375,10 @@ fn help_subsubcommand() {
- manual: Do not automatically fetch managed Python installations; require explicit
installation
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache
Expand Down Expand Up @@ -429,6 +446,9 @@ fn help_flag_subcommand() {
--python-fetch <PYTHON_FETCH>
Whether to automatically download Python when required [possible values: automatic,
manual]
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache [env: UV_NO_CACHE=]
--cache-dir [CACHE_DIR]
Expand Down Expand Up @@ -481,6 +501,9 @@ fn help_flag_subsubcommand() {
--python-fetch <PYTHON_FETCH>
Whether to automatically download Python when required [possible values: automatic,
manual]
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache [env: UV_NO_CACHE=]
--cache-dir [CACHE_DIR]
Expand Down Expand Up @@ -590,6 +613,9 @@ fn help_with_global_option() {
--python-fetch <PYTHON_FETCH>
Whether to automatically download Python when required [possible values: automatic,
manual]
--isolated
Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any
parent directories
-n, --no-cache
Avoid reading from or writing to the cache [env: UV_NO_CACHE=]
--cache-dir [CACHE_DIR]
Expand Down

0 comments on commit 663c190

Please sign in to comment.