I'm very, very new to Python (coming from Java and C++) so this is probably very basic and kinda embarassing:
I'm trying to use an instance of a class inside that class, but my IDE (PyCharm) tells me its an unresolved reference For exmaple (and this really is just an example so please no "just use some already existing Node class")
class Node(object):
def addChild(self, node: Node): # the word Node here is where the error happens
self.children.append(node)
I've tried googling all kinds phrasings and ive sat through several tutorials in the last few hours and I just dont understand what it is I'm doing wrong here or how I can declare the class before I define it. Or is what the IDE suggests, adding an additional "class Node(object): pass" above really the way this is done?