You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[project]
name = "uv-workspace"version = "0.1.0"description = "uv workspace"readme = "README.md"requires-python = ">=3.10"dependencies = []
[tool.uv.workspace]
members = ["packages/*"]
first pyproject.toml:
[project]
name = "first"version = "0.1.0"description = "first"readme = "README.md"requires-python = ">=3.10"dependencies = ["second", "b"] # note: there is no "a", but it is imported in the `src/first/*` files for more complex behavior
[tool.uv.sources]
second = { workspace = true }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
root/packages/first/src/first/*.py files contain imports for the following modules: second, a, b and first (import from itself).
uv run deptry . inside the root dir warns about the following depndencies of the first module: b, first, second. uv run deptry . inside the first dir warns about the following depndencies of the first module: a, first.
Expected behavior
each leaf package must be analyzed as if deptry was running from its root.
therefore, deptry from the root package should warn about a dependency of thefirst project.
deptry should not warn about "import from itself".
Additional context
The text was updated successfully, but these errors were encountered:
Environment
Describe the issue
uv run deptry .
foruv-workspace
gives bad results that on location.Minimal way to reproduce the issue
project structure:
root
pyproject.toml:first
pyproject.toml:second
pyproject.toml:root/packages/first/src/first/*.py
files contain imports for the following modules:second
,a
,b
andfirst
(import from itself).uv run deptry .
inside theroot
dir warns about the following depndencies of thefirst
module:b
,first
,second
.uv run deptry .
inside thefirst
dir warns about the following depndencies of thefirst
module:a
,first
.Expected behavior
leaf package
must be analyzed as ifdeptry
was running from its root.deptry
from theroot
package should warn abouta
dependency of thefirst
project.deptry
should not warn about "import from itself".Additional context
The text was updated successfully, but these errors were encountered: