Earlier quoted context omitted.
> If the type is a class with methods, then this method doesn't work Use typing.Self
I meant if you have two classes that need to refer to each other. But good pointer anyway, I hadn't noticed it, thanks!
class Foo:
def __init__(self, bar):
self.bar = bar
class Bar:
def __init__(self, foo):
self.foo = foo
Obviously both called into each other to do $THINGS... Pure madness.So my suggestion: Try not to have interdependent classes :D