Deptry should not always add translated package name as module name
akeeman opened this issue · 0 comments
akeeman commented
Describe the bug
<continuing the discussion started in #333>
The translated package name is always added as top level module name. I think that should not be the case.
To Reproduce
Steps to reproduce the behavior:
- Have a package named one thing (
foo
, orbar-python
), and have it install a module under an other name (respectivelyfox
, orbar
) - Find that recognized top level module names for the package includes the translated package name in addition to the detected top level module names.
Expected behavior
Only the detected top level module names should be recognized.
System [please complete the following information]:
- OS: *
- Language Version: *
- Poetry version: *
Additional context
Maybe it's better to only use it as fallback:
- Can the top level module names be detected using the metadata? Use those.
- If not, fall back to package name translation and raise a warning.