1from __future__ import annotations 2 3a:int=3 4b:str="foo" 5 6class MyClass: 7 a:int=4 8 b:str="bar" 9 def __init__(self, a, b): 10 self.a = a 11 self.b = b 12 def __eq__(self, other): 13 return isinstance(other, MyClass) and self.a == other.a and self.b == other.b 14 15def function(a:int, b:str) -> MyClass: 16 return MyClass(a, b) 17 18 19def function2(a:int, b:"str", c:MyClass) -> MyClass: 20 pass 21 22 23def function3(a:"int", b:"str", c:"MyClass"): 24 pass 25 26 27class UnannotatedClass: 28 pass 29 30def unannotated_function(a, b, c): pass 31 32class MyClassWithLocalAnnotations: 33 mytype = int 34 x: mytype 35