From 4739b519f8882089ffd8a26bdcca499a7e95defd Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 23 Aug 2024 08:56:17 -0500 Subject: [PATCH] Add `--no-project` alias for `uv python pin --no-workspace` --- crates/uv-cli/src/lib.rs | 12 ++++++------ docs/reference/cli.md | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 5ceaaf1f167e..e4935ec6d81a 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -3060,13 +3060,13 @@ pub struct PythonPinArgs { #[arg(long, overrides_with("no_resolved"), hide = true)] pub no_resolved: bool, - /// Avoid validating the Python pin is compatible with the workspace. + /// Avoid validating the Python pin is compatible with the project or workspace. /// - /// By default, a workspace is discovered in the current directory or any parent - /// directory. If a workspace is found, the Python pin is validated against - /// the workspace's `requires-python` constraint. - #[arg(long)] - pub no_workspace: bool, + /// By default, a project or workspace is discovered in the current directory or any parent + /// directory. If a workspace is found, the Python pin is validated against the workspace's + /// `requires-python` constraint. + #[arg(long, alias = "no-workspace")] + pub no_project: bool, } #[derive(Args)] diff --git a/docs/reference/cli.md b/docs/reference/cli.md index c484397ead82..f44965529576 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -3293,11 +3293,11 @@ uv python pin [OPTIONS] [REQUEST]

For example, spinners or progress bars.

-
--no-python-downloads

Disable automatic downloads of Python.

+
--no-project

Avoid validating the Python pin is compatible with the project or workspace.

-
--no-workspace

Avoid validating the Python pin is compatible with the workspace.

+

By default, a project or workspace is discovered in the current directory or any parent directory. If a workspace is found, the Python pin is validated against the workspace’s requires-python constraint.

-

By default, a workspace is discovered in the current directory or any parent directory. If a workspace is found, the Python pin is validated against the workspace’s requires-python constraint.

+
--no-python-downloads

Disable automatic downloads of Python.

--offline

Disable network access.