Well the problem is like this:
class A():
def foo() -> B:
pass
class B():
def bar() -> A:
pass
This will raise a NameError: name 'B' is not defined.
So for the sake of type checking, I'm not willing to change -> B to -> "B". So is there any workaround?
For further discussion, I really can't see any point in an annotation like "def foo(a: 'x', b: 5 + 6, c: list) -> max(2, 9):" (IN PEP 3107). Why the hell python threat these annotations for expression?