Name not defined in type annotation [duplicate]
You have a forward declaration; functions (to be bound as methods) are created before the class is, so the name Vector doesn’t yet exist. Only when all of the class body has been executed, can Python create the class object and bind the name Vector to it. Simply use a string with the name instead: … Read more