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
If a conditional dependency like importlib-metadata = { version = "*", python = "<=3.7" } is not installed, it will be marked as missing:
-----------------------------------------------------
There are dependencies missing from pyproject.toml:
importlib_metadata
Consider adding them to your project's dependencies.
-----------------------------------------------------
This is because there is no way for deptry to link the module to the dependency if it is not installed.
There is a potential solution that should work in 95% of the cases; If a missing module is found AND there are conditional dependencies, do a similarity match between the dependency name and the module name. e.g. we could replace _ with - and check for equality, or use e.g. the Lehvenstein distance.
The text was updated successfully, but these errors were encountered:
Describe the bug
If a conditional dependency like
importlib-metadata = { version = "*", python = "<=3.7" }
is not installed, it will be marked as missing:This is because there is no way for deptry to link the module to the dependency if it is not installed.
There is a potential solution that should work in 95% of the cases; If a missing module is found AND there are conditional dependencies, do a similarity match between the dependency name and the module name. e.g. we could replace
_
with-
and check for equality, or use e.g. the Lehvenstein distance.The text was updated successfully, but these errors were encountered: