~ | Merge pull request #891 from Lin-jun-xiang/fix-TypeDict-error

Fix: `TypedDict` from `typing` error #886
This commit is contained in:
Tekky 2023-09-11 12:33:59 +01:00 committed by GitHub
commit 5e7ea0d8f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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