Skip to content

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

Open
@matthewdeanmartin

Description

@matthewdeanmartin

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions