Feature Request Summary
smart-programmer opened this issue · 0 comments
Is your feature request related to a problem? Please describe.
Currently, deptry
cannot detect if an extra package is needed for a feature that is used in the codebase. This is because extra packages are not directly imported in the codebase. An example is the pydantic
package, which provides an EmailStr
type that can be used for emails. This feature relies on the email_validator
package to validate the email. However, Poetry cannot detect this dependency between pydantic
and email_validator
if EmailStr
is used in the codebase.
Describe the solution you would like
I would like Poetry to be able to detect whether an installed extra package is needed for a feature in the codebase. One possible solution is to introduce a flag, such as --extras, that can be used like this: deptry --extras .
. The output of this command would be the list of unused extra packages.
Is this feature within the scope of the project or even possible at all?
Additional context
pydantic
using email_validator
for EmailStr