When I annotate a method argument with the enclosing class as its type in python, I get an error that the type is not (yet) defined. E.g. the code
class Foobar:
def foo(self, bar: Foobar):
...
produces NameError: name 'Foobar' is not defined
. What's the correct approach to this?