Because when it encounters Translate(when compiling the body of the class), it Vector2has not yet been defined (currently it compiles, the name binding has not been done); Python naturally complains.
Since this is such a common scenario (hints of the class type in the body of this class), you should use a direct link to it, enclosing it in quotation marks:
class Vector2:
def Translate(self, pos: 'Vector2'):
self.x += pos.x
self.y += pos.y
Python ( , PEP 484) . Python , __annotations__ typing.get_type_hints:
from typing import get_type_hints
get_type_hints(Vector2(1,2).Translate)
{'pos': __main__.Vector2}
Python 3.7; . abarnert .