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

Auto-generated regular expressions #514

Open
basvandriel opened this issue Nov 10, 2023 · 1 comment
Open

Auto-generated regular expressions #514

basvandriel opened this issue Nov 10, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@basvandriel
Copy link

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

For example, when you have a list of 50 dependencies that can be removed, I would like to find those in my editor and remove them. It can take a lot of unnecessary time when then having to select them manually from the terminal output.

Describe the solution you would like

For the dependencies that are unused (DEP002), a regular expression matching all those would be nice to see generated. This would make it easy to easily remove them.

@basvandriel basvandriel added the enhancement New feature or request label Nov 10, 2023
@mkniewallner
Copy link
Collaborator

Hi, I'm not fully sure to get what you want. Do you expect deptry, in case of DEP002 violations, to report a way to facilitate removing unused dependencies in a project, as a sort of one-liner? If so, how would the regex works? Wouldn't it be too specific to the editor in use?

If we really were to do that, I would rather see a more portable solution, like automatically removing the dependencies that are unused if given a certain flag, although this could remove some dependencies that are never imported but still necessary in the codebase, so even that solution would be dangerous.

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

2 participants