mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
TypedDict fixup for older python versions
This commit is contained in:
10
jc/utils.py
10
jc/utils.py
@ -6,16 +6,20 @@ import shutil
|
||||
from datetime import datetime, timezone
|
||||
from textwrap import TextWrapper
|
||||
from functools import lru_cache
|
||||
from typing import List, Dict, Iterable, Union, Optional, TypedDict, TextIO
|
||||
from typing import List, Dict, Iterable, Union, Optional, TextIO
|
||||
|
||||
TSFormatType = TypedDict(
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import TypedDict
|
||||
TSFormatType = TypedDict(
|
||||
'TSFormatType',
|
||||
{
|
||||
'id': int,
|
||||
'format': str,
|
||||
'locale': Optional[str]
|
||||
}
|
||||
)
|
||||
)
|
||||
else:
|
||||
TSFormatType = Dict
|
||||
|
||||
|
||||
def _asciify(string: str) -> str:
|
||||
|
Reference in New Issue
Block a user