Fix: TypedDict from typing error #886

Ref: https://github.com/python/typeshed/issues/3500
This commit is contained in:
hs_junxiang 2023-09-11 15:29:48 +08:00
parent 1fc9ec91ea
commit 8ad46284b9
2 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,10 @@
from typing import Any, AsyncGenerator, Generator, NewType, Tuple, TypedDict, Union
import sys
from typing import Any, AsyncGenerator, Generator, NewType, Tuple, Union
if sys.version_info >= (3, 8):
from typing import TypedDict
else:
from typing_extensions import TypedDict
SHA256 = NewType('sha_256_hash', str)
CreateResult = Generator[str, None, None]
@ -11,4 +17,4 @@ __all__ = [
'TypedDict',
'SHA256',
'CreateResult',
]
]

View File

@ -9,3 +9,4 @@ js2py
quickjs
flask
flask-cors
typing-extensions