diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index b57e93650250..710a54deb2e0 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -1983,9 +1983,12 @@ pub struct AddArgs { #[arg(long, conflicts_with("dev"))] pub optional: Option, - /// Add the requirements as editables. - #[arg(long, default_missing_value = "true", num_args(0..=1))] - pub editable: Option, + #[arg(long, overrides_with = "no_editable", hide = true)] + pub editable: bool, + + /// Don't add the requirements as editables. + #[arg(long, overrides_with = "editable")] + pub no_editable: bool, /// Add source requirements to the `project.dependencies` section of the `pyproject.toml`. /// diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index 3d25120f03bb..286c90a73b93 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -609,6 +609,7 @@ impl AddSettings { dev, optional, editable, + no_editable, extra, raw_sources, rev, @@ -641,13 +642,13 @@ impl AddSettings { frozen, requirements, dependency_type, - editable, raw_sources, rev, tag, branch, package, python, + editable: flag(editable, no_editable), extras: extra.unwrap_or_default(), refresh: Refresh::from(refresh), settings: ResolverInstallerSettings::combine(