Add --group and --only-group to uv run (#8274)

Similar to #8110

Part of #8090
This commit is contained in:
Zanie Blue 2024-10-18 12:06:25 -05:00
parent d2e1f180ef
commit 39ca57f3c8
6 changed files with 261 additions and 16 deletions

View file

@ -2611,6 +2611,20 @@ pub struct RunArgs {
#[arg(long, overrides_with("dev"))]
pub no_dev: bool,
/// Include dependencies from the specified local dependency group.
///
/// May be provided multiple times.
#[arg(long, conflicts_with("only_group"))]
pub group: Vec<GroupName>,
/// Only include dependencies from the specified local dependency group.
///
/// May be provided multiple times.
///
/// The project itself will also be omitted.
#[arg(long, conflicts_with("group"))]
pub only_group: Vec<GroupName>,
/// Run a Python module.
///
/// Equivalent to `python -m <module>`.