diff --git a/steam/_const.py b/steam/_const.py index 9b210073..76764079 100644 --- a/steam/_const.py +++ b/steam/_const.py @@ -22,6 +22,8 @@ from .types.vdf import BinaryVDFDict, VDFDict if TYPE_CHECKING: + from typing_extensions import Buffer + from .state import ConnectionState DOCS_BUILDING: bool = getattr(builtins, "__sphinx__", False) @@ -121,7 +123,7 @@ def binary_loads( STEAM_EPOCH: Final = datetime(2003, 1, 1, tzinfo=timezone.utc) -def READ_U32(s: bytes, unpacker: Callable[[bytes], tuple[int]] = struct.Struct(" int: +def READ_U32(s: Buffer, unpacker: Callable[[Buffer], tuple[int]] = struct.Struct(" int: (u32,) = unpacker(s) return u32