1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

use typing Tuple for <3.9 compatibility

This commit is contained in:
Kelly Brazil
2022-10-18 11:24:55 -07:00
parent f6e971c652
commit 1b44b5b05a

View File

@ -2,11 +2,11 @@
import sys import sys
from datetime import datetime from datetime import datetime
from typing import Dict, List, Iterator, Optional, Union from typing import Dict, List, Tuple, Iterator, Optional, Union
JSONDictType = Dict[str, Union[str, int, float, bool, List, Dict, None]] JSONDictType = Dict[str, Union[str, int, float, bool, List, Dict, None]]
MetadataType = Dict[str, Optional[Union[str, int, float, List[str], datetime]]] MetadataType = Dict[str, Optional[Union[str, int, float, List[str], datetime]]]
StreamingOutputType = Iterator[Union[JSONDictType, tuple[BaseException, str]]] StreamingOutputType = Iterator[Union[JSONDictType, Tuple[BaseException, str]]]
if sys.version_info >= (3, 8): if sys.version_info >= (3, 8):
from typing import TypedDict from typing import TypedDict