-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I have a dependency in two groups with one group included in the defaults like below:
dependencies = [
# some deps
]
[dependency-groups]
dev = [
# some dev deps
]
cpu = [
"torch>=2.2.2",
]
gpu = [
"torch>=2.2.2",
]
[tool.uv]
default-groups = ["dev", "gpu"]
conflicts = [
[
{ group = "cpu" },
{ group = "gpu" },
],
]
[[tool.uv.index]]
name = "pytorch-cu118"
url = "https://download.pytorch.org/whl/cu118"
explicit = true
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", group = "cpu" },
{ index = "pytorch-cu118", group = "gpu", marker = "platform_system == 'Linux'" },
]deptry doesn't seem to recognise these uv groups and complains:
DEP004 'torch' imported but declared as a dev dependency
Would be nice if it could detect this scenario.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request