deptry¶
A Dagger module for linting Python dependency issues with deptry. It finds unused, missing, misplaced, and transitive dependencies.
projects is a collection
of the Python projects in the source tree, keyed by path. check runs deptry on
each one, so every project is its own check.
Installation¶
Usage¶
Run the checks over the current source tree:
A project is in projects when its pyproject.toml declares dependencies and it
either:
- has a
src/layout matching[project].name - has a directory matching
[project].name - declares a
[tool.deptry]section in itspyproject.toml
Check a single project by its path (see Select collection items):
Skipping projects¶
The exclude setting takes glob patterns, matched against each project's
source-relative path, and leaves matching projects out of projects:
Configuring deptry¶
dagger check runs checks with their default arguments, so deptry's options are
constructor settings too: version picks the deptry release, and args adds
arguments before the project root. String settings are JSON, so they need inner quotes: