1 """Module for testing the behavior of generics across different modules."""
2
3 from typing import TypeVar, Generic, Optional, TypeAliasType
4
5 default_a: Optional['A'] = None
6 default_b: Optional['B'] = None
7
8 T = TypeVar('T')
9
10
11 class ESC[4;38;5;81mA(ESC[4;38;5;149mGeneric[T]):
12 some_b: 'B'
13
14
15 class ESC[4;38;5;81mB(ESC[4;38;5;149mGeneric[T]):
16 class ESC[4;38;5;81mA(ESC[4;38;5;149mGeneric[T]):
17 pass
18
19 my_inner_a1: 'B.A'
20 my_inner_a2: A
21 my_outer_a: 'A' # unless somebody calls get_type_hints with localns=B.__dict__
22
23 type Alias = int
24 OldStyle = TypeAliasType("OldStyle", int)