thebjorn / pydeps

Python Module Dependency graphs
https://pydeps.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
1.8k stars 114 forks source link

pydeps 1.12.2 introduces bogus import #182

Closed vonschultz closed 1 year ago

vonschultz commented 1 year ago

Setup

echo import someimportforillustrationpurposes > a.py
echo import a > b.py
echo import b > c.py

Old behavior / Expected behavior

Using pydeps version 1.11.2, the following works perfectly, reporting that c only imports b:

pydeps --include-missing --show-deps c.py 

The graph is someimportforillustrationpurposesabc, with no other dependency arrows.

New behavior / Unexpected behavior

Using pydeps version 1.12.2, the following works reports that c.py imports both a and b:

pydeps --include-missing --show-deps c.py 

The graph is someimportforillustrationpurposesabc.py with an extra arrow from a to c.py.

thebjorn commented 1 year ago

@vonschultz thanks for the bug-report. It should be fixed in v1.12.3 available on PyPI.

vonschultz commented 1 year ago

Thanks. Looks good.