Deptry: Dependency Hygiene¶
Deptry checks Python imports against the dependencies declared in pyproject.toml. It
detects missing runtime dependencies, unused declared dependencies, and imports that
are available only through another package.
Usage in Zenith¶
Run the dependency check through Poe:
In the template repository, the task scans hooks/ and scripts/. In a generated
project, it runs tach check for internal module boundaries and deptry src for
package dependencies.
Run Deptry directly when you need to inspect its findings:
Deptry reads project metadata and its configuration from pyproject.toml. Use
[tool.deptry] there only when the project needs exclusions or import-name mappings.