Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/zmq/_typing.py: 0%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from __future__ import annotations
3import sys
4from typing import Any, Dict
6if sys.version_info >= (3, 8):
7 from typing import Literal, TypedDict
8else:
9 # avoid runtime dependency on typing_extensions on py37
10 try:
11 from typing_extensions import Literal, TypedDict # type: ignore
12 except ImportError:
14 class _Literal:
15 def __getitem__(self, key):
16 return Any
18 Literal = _Literal() # type: ignore
20 class TypedDict(Dict): # type: ignore
21 pass
24if sys.version_info >= (3, 10):
25 from typing import TypeAlias
26else:
27 try:
28 from typing_extensions import TypeAlias
29 except ImportError:
30 TypeAlias = type # type: ignore