Skip to content

Reports package as an extra if it's not installed, even if it's imported #81

@MrMino

Description

@MrMino

This is a problem converse to the one from #80.

If a package is not installed, pip-extra-reqs will report it as extra even if it's actually used.

Consider the following (with requests uninstalled):

# requirements.txt
requests
# module.py
from requests import get
> pip-extra-reqs module.py  # ❌ Requests is actually used
Extra requirements:
requests in requirements.txt

After pip install requests, the problem above vanishes.
This is a false-positive result, i.e. bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions