fpgmaas/deptry

Deptry should not always add translated package name as module name

akeeman opened this issue · 0 comments

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:

  1. Have a package named one thing (foo, or bar-python), and have it install a module under an other name (respectively fox, or bar)
  2. 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:

  1. Can the top level module names be detected using the metadata? Use those.
  2. If not, fall back to package name translation and raise a warning.