-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Needs PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationpyreverseRelated to pyreverse componentRelated to pyreverse component
Description
Bug description
See this SO question.
Foo.py
, Bar.py
and __init__.py
are all located in the same folder.
Foo.py
:
class Foo():
def print_foo(self):
print("hi")
Bar.py
:
from Foo import Foo
class Bar(Foo):
pass
pyreverse
is executed from within the same folder.
Configuration
No response
Command used
pyreverse -ASmy -o png .
Pylint output
The resulting image shows both classes `Foo` and `Bar`, but not the inheritance relationship between them.
Expected behavior
It could be argued that when using an __init__.py
and therefore a package relative or absolute imports should be used, the code provided does run fine when just running e.g. python -c "import Bar"
from inside the directory.
Therefore pyreverse
should pick up the relationships between the two classes as well.
Pylint version
pylint 2.14.5
astroid 2.12.10
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0]
OS / Environment
No response
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
Needs PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationpyreverseRelated to pyreverse componentRelated to pyreverse component