Search code examples
pythonumlpylintpyreverse

pyreverse doesn't draw relationships/arrows/connections


Hey I kinda got Pyreverse to work, it's now showing my classes but it doesn't draw connections between the classes.

In one class I got

class webserver:
    print('stuff')
    getcaller1 = getcaller.GetCaller()
    device_dict = getcaller1.abc(m)

and the other one contains

class GetCaller():

    def __init__():
        print('init')

    def abc(self, m):

        devices=get(m)

However, all I am getting in my classes.png is this (no lines or arrows in between the classes) enter image description here

The code works and if I run pyreverse stuff on pip-installed modules, pyreverse does print those arrows but there must be something I am missing in my own project. What other kind of relationships can python classes have?


Solution

  • New answer I've realized that the problem sat in front of the screen. I haven't used any objects of classes, only imports and static method calls with return values. This way, the image that I got (without attributes and function names etc) technically was the correct image. However, if you want to cheat your way into it to visualize some of your code, check the old answer

    Old answer: I have no idea if that's the way it's supposed to work like but what worked is to put the classes in the same file, maybe it only searches on module-scope.