deptry icon indicating copy to clipboard operation
deptry copied to clipboard

Support PEP 735

Open mjspeck opened this issue 6 months ago • 3 comments

Is your feature request related to a problem? Please describe.

Right now, Deptry looks for [project.optional-dependencies] in pyproject.toml, but not for [dependency-groups] which was added in PEP 735. This makes it erroneously classify any dependencies listed there as transitive.

Describe the solution you would like

Look for both [project.optional-dependencies] and [depdency-groups] for dependencies. In theory, [project.optional-dependencies] should only have runtime dependencies, while [dependecy-groups] should have building, testing, linting, etc. dependencies, so a more advanced solution would allow deptry to only check those dependencies against certain files (like the tests folder, for example).

Additional context

mjspeck avatar Apr 30 '25 17:04 mjspeck