|
21 | 21 | from unittest import TestCase, main, skipUnless, skipIf
|
22 | 22 | from unittest.mock import patch
|
23 | 23 | import typing
|
24 |
| -from typing import Optional, Union, AnyStr |
25 |
| -from typing import T, KT, VT # Not in __all__. |
26 |
| -from typing import Tuple, List, Set, Dict, Iterable, Iterator, Callable |
27 |
| -from typing import Generic |
28 |
| -from typing import no_type_check |
29 | 24 | import warnings
|
30 | 25 |
|
31 | 26 | import typing_extensions
|
|
36 | 31 | from typing_extensions import TypeVarTuple, Unpack, dataclass_transform, reveal_type, Never, assert_never, LiteralString
|
37 | 32 | from typing_extensions import assert_type, get_type_hints, get_origin, get_args, get_original_bases
|
38 | 33 | from typing_extensions import clear_overloads, get_overloads, overload
|
39 |
| -from typing_extensions import NamedTuple, TypeIs |
| 34 | +from typing_extensions import NamedTuple, TypeIs, no_type_check, Dict |
40 | 35 | from typing_extensions import override, deprecated, Buffer, TypeAliasType, TypeVar, get_protocol_members, is_protocol
|
41 |
| -from typing_extensions import Doc, NoDefault |
| 36 | +from typing_extensions import Doc, NoDefault, List, Union, AnyStr, Iterable, Generic, Optional, Set, Tuple, Callable |
42 | 37 | from _typed_dict_test_helper import Foo, FooGeneric, VeryAnnotated
|
43 | 38 |
|
44 | 39 | NoneType = type(None)
|
| 40 | +T = TypeVar("T") |
| 41 | +KT = TypeVar("KT") |
| 42 | +VT = TypeVar("VT") |
45 | 43 |
|
46 | 44 | # Flags used to mark tests that only apply after a specific
|
47 | 45 | # version of the typing module.
|
|
67 | 65 | )
|
68 | 66 |
|
69 | 67 | ANN_MODULE_SOURCE = '''\
|
70 |
| -from typing import Optional |
| 68 | +from typing import List, Optional |
71 | 69 | from functools import wraps
|
72 | 70 |
|
73 | 71 | __annotations__[1] = 2
|
|
0 commit comments