Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request Summary #441

Open
smart-programmer opened this issue Jul 12, 2023 · 0 comments
Open

Feature Request Summary #441

smart-programmer opened this issue Jul 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@smart-programmer
Copy link

smart-programmer commented Jul 12, 2023

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

WhatsApp Image 2023-07-11 at 2 57 07 PM

@smart-programmer smart-programmer added the enhancement New feature or request label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant