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

[FR]: Detect unused Python dependencies #296

Open
jab opened this issue Jun 18, 2024 · 2 comments
Open

[FR]: Detect unused Python dependencies #296

jab opened this issue Jun 18, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jab
Copy link

jab commented Jun 18, 2024

What is the current behavior?

No linter is currently supported that detects unused Python dependencies.

Describe the feature

Enable Python users to notice when they are taking dependencies that no targets are actually importing.

https://github.com/tweag/FawltyDeps is an existing tool that enables this for pip dependencies (as well as the opposite - noticing when code is importing a dependency that is not being taken).

Not sure if there is something more general-purpose (eg also works with non-pip deps, ideally even for other languages, by leveraging Bazel).

@jab jab added the enhancement New feature or request label Jun 18, 2024
@alexeagle
Copy link
Member

Normally it's gazelle's job to manage deps by removing those which aren't imported (and have no #keep comment)
I'm not sure if it's desirable to have a second competing workflow for that...

@jab
Copy link
Author

jab commented Jun 18, 2024

Does gazelle look in pyproject.toml and requirements.in files?

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