I have two classes from two different files.
I want to use type hints to make it easier to use.
from b import ClassB
# a.py
class ClassA():
b: ClassB
def __init__(self):
self.b = None
from a import ClassA
# b.py
class ClassB():
a: ClassA
def __init__(self):
self.a = None
But I run into a circular dependency problem
this doesn't work either because ClassA
is not defined in this file
# b.py
class ClassB():
a: "ClassA"
def __init__(self):
self.a = None