Add -U/-P short flags for --upgrade/--upgrade-package (#1394)

Closes https://github.com/astral-sh/uv/issues/1340
This commit is contained in:
Zanie Blue 2024-02-15 19:34:19 -06:00 committed by GitHub
parent 896ab1c54f
commit 0f554b0913
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -256,12 +256,12 @@ struct PipCompileArgs {
find_links: Vec<FlatIndexLocation>,
/// Allow package upgrades, ignoring pinned versions in the existing output file.
#[clap(long)]
#[clap(long, short = 'U')]
upgrade: bool,
/// Allow upgrades for a specific package, ignoring pinned versions in the existing output
/// file.
#[clap(long)]
#[clap(long, short = 'P')]
upgrade_package: Vec<PackageName>,
/// Include distribution hashes in the output file.
@ -471,11 +471,11 @@ struct PipInstallArgs {
all_extras: bool,
/// Allow package upgrades.
#[clap(long)]
#[clap(long, short = 'U')]
upgrade: bool,
/// Allow upgrade of a specific package.
#[clap(long)]
#[clap(long, short = 'P')]
upgrade_package: Vec<PackageName>,
/// Reinstall all packages, regardless of whether they're already installed.