You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since pip-missing-reqs does not try to actually execute the import statements, but rather parses the AST (see ImportVisitor in common.py), it doesn't really know when an import is bound to fail with an ImportError. And it doesn't seem to check it.
Consider the following (with paramiko uninstalled):
# requirements.txt
something-totally-unrelated
# module.py
import paramiko
> pip-extra-reqs module.py # ✅ Works as expected
Extra requirements:
something-totally-unrelated in requirements.txt
> pip-missing-reqs
pip-missing-reqs module.py # ❌ Shows no output
A typo in an import statement or a package uninstalled by mistake will not trigger any errors.
On the other hand, it seems that adding a check for this might lead to lots of false-positives.
Add an option to report missing imports as errors or warnings to pip-missing-reqs. Consider changing the default ("no action") to "report as errors".
The text was updated successfully, but these errors were encountered:
Since
pip-missing-reqs
does not try to actually execute the import statements, but rather parses the AST (seeImportVisitor
incommon.py
), it doesn't really know when an import is bound to fail with anImportError
. And it doesn't seem to check it.Consider the following (with
paramiko
uninstalled):A typo in an import statement or a package uninstalled by mistake will not trigger any errors.
On the other hand, it seems that adding a check for this might lead to lots of false-positives.
Add an option to report missing imports as errors or warnings to
pip-missing-reqs
. Consider changing the default ("no action") to "report as errors".The text was updated successfully, but these errors were encountered: