Mark --raw-sources as conflicting with sources-specific arguments (#5378)

## Summary

We should error on, e.g., `--raw-sources --tag 0.0.1`.
This commit is contained in:
Charlie Marsh 2024-07-23 18:03:01 -04:00 committed by GitHub
parent 76566b09be
commit 8942ec36c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 3 deletions

View file

@ -2010,10 +2010,18 @@ pub struct AddArgs {
#[arg(long, overrides_with = "editable")]
pub no_editable: bool,
/// Add source requirements to the `project.dependencies` section of the `pyproject.toml`.
/// Add source requirements to `project.dependencies`, rather than `tool.uv.sources`.
///
/// Without this flag, uv will try to use `tool.uv.sources` for any sources.
#[arg(long)]
/// By default, uv will use the `tool.uv.sources` section to record source information for Git,
/// local, editable, and direct URL requirements.
#[arg(
long,
conflicts_with = "editable",
conflicts_with = "no_editable",
conflicts_with = "rev",
conflicts_with = "tag",
conflicts_with = "branch"
)]
pub raw_sources: bool,
/// Specific commit to use when adding from Git.