1 from __future__ import annotations
2
3 a:int=3
4 b:str="foo"
5
6 class ESC[4;38;5;81mMyClass:
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
15 def function(a:int, b:str) -> MyClass:
16 return MyClass(a, b)
17
18
19 def function2(a:int, b:"str", c:MyClass) -> MyClass:
20 pass
21
22
23 def function3(a:"int", b:"str", c:"MyClass"):
24 pass
25
26
27 class ESC[4;38;5;81mUnannotatedClass:
28 pass
29
30 def unannotated_function(a, b, c): pass
31
32 class ESC[4;38;5;81mMyClassWithLocalAnnotations:
33 mytype = int
34 x: mytype