mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 02:48:17 +00:00
Allow --no-dev --invert
in uv tree
(#11068)
## Summary Closes https://github.com/astral-sh/uv/issues/11062.
This commit is contained in:
parent
48976e12e8
commit
f6a15b79f7
2 changed files with 14 additions and 1 deletions
|
@ -3385,7 +3385,7 @@ pub struct TreeArgs {
|
|||
/// Omit the development dependency group.
|
||||
///
|
||||
/// This option is an alias for `--no-group dev`.
|
||||
#[arg(long, overrides_with("dev"), conflicts_with = "invert")]
|
||||
#[arg(long, overrides_with("dev"))]
|
||||
pub no_dev: bool,
|
||||
|
||||
/// Include dependencies from the specified dependency group.
|
||||
|
|
|
@ -578,6 +578,7 @@ fn dev_dependencies_inverted() -> Result<()> {
|
|||
version = "0.1.0"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = ["iniconfig"]
|
||||
|
||||
[tool.uv]
|
||||
dev-dependencies = ["anyio"]
|
||||
"#,
|
||||
|
@ -601,6 +602,18 @@ fn dev_dependencies_inverted() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert").arg("--no-dev"), @r###"
|
||||
success: true
|
||||
exit_code: 0
|
||||
----- stdout -----
|
||||
iniconfig v2.0.0
|
||||
└── project v0.1.0
|
||||
|
||||
----- stderr -----
|
||||
Resolved 5 packages in [TIME]
|
||||
"###
|
||||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue