pylint-dev / pylint

It's not just a linter that annoys you!
https://pylint.readthedocs.io/en/latest/
GNU General Public License v2.0
5.24k stars 1.12k forks source link

Pyreverse unable to detect relative imports #9559

Open balintkeri opened 4 months ago

balintkeri commented 4 months ago

Bug description

The pyreverse doesn't detect any relative import (from . import something), doesn't show any connection between packages.

Configuration

No response

Command used

pyreverse something -o html

Pylint output

The html files, but in the packages result, there were no connections between relative imported files

Expected behavior

A html, where i find connection between the relative imported files

Pylint version

pylint 3.1.0
astroid 3.1.0
python 3.9.12.

OS / Environment

No response

Additional dependencies

No response

DanielNoord commented 4 months ago

Without the python files you were running pyreverse on we can't really debug this.

balintkeri commented 4 months ago

dummy.zip

I have this example package. If i run pyreverse dummy -o html, i got this package diagram:

image

The import arrow is missing between the dummy2 and dummy3, dummy4

balintkeri commented 4 months ago

@DanielNoord

DanielNoord commented 4 months ago

Sorry I'm quite busy and pyreverse is not always on the top of my priorities.

I don't really like downloading random zip files from the internet. I guess if somebody has the time to locally check and fix this a PR would be welcome but we can't promise anything.