Fix typing issues

This commit is contained in:
Lonami Exo
2023-08-31 13:32:57 +02:00
parent 60ed7a32fe
commit 7c112d8b0f
2 changed files with 12 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ class Request(bytes, Generic[Return]):
@property
def constructor_id(self) -> int:
try:
cid = struct.unpack("<i", self[:4])[0]
cid = struct.unpack_from("<I", self)[0]
assert isinstance(cid, int)
return cid
except struct.error: