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.