crap icon indicating copy to clipboard operation
crap copied to clipboard

Clarifying what this does, how do you deal with the `import != package name` problem?

Open matthewdeanmartin opened this issue 7 months ago • 1 comments

This examines a venv's source files for imports and then removes packages that are not imported.

Because some packages exist to provide a command line tool instead, those are skipped via the important packages list.

This appears to have over-lapping functionality with poetry --sync which removes no longer declared dependencies. This tool appears to even remove declared dependencies, that the original developer never bothered to import for some reason.

Anyhow, the main problem I see is when the package name doesn't match the import or the package has several top-level modules. (an example is beautifulsoup4/ bs4)

matthewdeanmartin avatar Dec 30 '23 13:12 matthewdeanmartin