Merge pull request #36 from Oli4/main

fix(core.pyi): replaces typing.TypeAlias by typing_extensions.TypeAlias for compatibility with python3.9
This commit is contained in:
timrid 2025-10-26 22:29:24 +01:00 committed by GitHub
commit fe19de7b48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,7 @@ from construct.lib import (
from cryptography.hazmat.primitives.ciphers import Cipher
from cryptography.hazmat.primitives.ciphers.aead import AESCCM, AESGCM, ChaCha20Poly1305
from cryptography.hazmat.primitives.ciphers.modes import Mode
from typing_extensions import Buffer
from typing_extensions import Buffer, TypeAlias
# unfortunately, there are a few duplications with "typing", e.g. Union and Optional, which is why the t. prefix must be used everywhere
@ -29,7 +29,7 @@ from typing_extensions import Buffer
# - Higher Kinded Types: https://github.com/python/typing/issues/548
# - Higher Kinded Types: https://sobolevn.me/2020/10/higher-kinded-types-in-python
ReadableBuffer: t.TypeAlias = Buffer
ReadableBuffer: TypeAlias = Buffer
StreamType = t.IO[bytes]
FilenameType = t.Union[str, bytes, os.PathLike[str], os.PathLike[bytes]]
PathType = str