diff --git a/pyrogram/api/core/future_salt.py b/pyrogram/api/core/future_salt.py index e9697458..e9ef5a0f 100644 --- a/pyrogram/api/core/future_salt.py +++ b/pyrogram/api/core/future_salt.py @@ -32,7 +32,7 @@ class FutureSalt(Object): self.salt = salt @staticmethod - def read(b: BytesIO) -> "FutureSalt": + def read(b: BytesIO, *args) -> "FutureSalt": valid_since = datetime.fromtimestamp(Int.read(b)) valid_until = datetime.fromtimestamp(Int.read(b)) salt = Long.read(b) diff --git a/pyrogram/api/core/future_salts.py b/pyrogram/api/core/future_salts.py index d1a62d95..7fe08020 100644 --- a/pyrogram/api/core/future_salts.py +++ b/pyrogram/api/core/future_salts.py @@ -33,7 +33,7 @@ class FutureSalts(Object): self.salts = salts @staticmethod - def read(b: BytesIO) -> "FutureSalts": + def read(b: BytesIO, *args) -> "FutureSalts": req_msg_id = Long.read(b) now = datetime.fromtimestamp(Int.read(b)) diff --git a/pyrogram/api/core/gzip_packed.py b/pyrogram/api/core/gzip_packed.py index 58d22760..0a3afb26 100644 --- a/pyrogram/api/core/gzip_packed.py +++ b/pyrogram/api/core/gzip_packed.py @@ -30,7 +30,7 @@ class GzipPacked(Object): self.packed_data = packed_data @staticmethod - def read(b: BytesIO) -> "GzipPacked": + def read(b: BytesIO, *args) -> "GzipPacked": # Return the Object itself instead of a GzipPacked wrapping it return Object.read( BytesIO( diff --git a/pyrogram/api/core/message.py b/pyrogram/api/core/message.py index 045c51bb..181a0e99 100644 --- a/pyrogram/api/core/message.py +++ b/pyrogram/api/core/message.py @@ -32,7 +32,7 @@ class Message(Object): self.body = body @staticmethod - def read(b: BytesIO) -> "Message": + def read(b: BytesIO, *args) -> "Message": msg_id = Long.read(b) seq_no = Int.read(b) length = Int.read(b) diff --git a/pyrogram/api/core/msg_container.py b/pyrogram/api/core/msg_container.py index 57286cd6..58a49bf9 100644 --- a/pyrogram/api/core/msg_container.py +++ b/pyrogram/api/core/msg_container.py @@ -30,7 +30,7 @@ class MsgContainer(Object): self.messages = messages @staticmethod - def read(b: BytesIO) -> "MsgContainer": + def read(b: BytesIO, *args) -> "MsgContainer": count = Int.read(b) return MsgContainer([Message.read(b) for _ in range(count)]) diff --git a/pyrogram/api/core/primitives/bytes.py b/pyrogram/api/core/primitives/bytes.py index 43ec4234..261a5dad 100644 --- a/pyrogram/api/core/primitives/bytes.py +++ b/pyrogram/api/core/primitives/bytes.py @@ -23,7 +23,7 @@ from ..object import Object class Bytes(Object): @staticmethod - def read(b: BytesIO) -> bytes: + def read(b: BytesIO, *args) -> bytes: length = int.from_bytes(b.read(1), "little") if length <= 253: diff --git a/pyrogram/api/core/primitives/double.py b/pyrogram/api/core/primitives/double.py index e4a7ac48..281a3c3a 100644 --- a/pyrogram/api/core/primitives/double.py +++ b/pyrogram/api/core/primitives/double.py @@ -24,7 +24,7 @@ from ..object import Object class Double(Object): @staticmethod - def read(b: BytesIO) -> float: + def read(b: BytesIO, *args) -> float: return unpack("d", b.read(8))[0] def __new__(cls, value: float) -> bytes: diff --git a/pyrogram/api/core/primitives/string.py b/pyrogram/api/core/primitives/string.py index ed2d9270..493dacd9 100644 --- a/pyrogram/api/core/primitives/string.py +++ b/pyrogram/api/core/primitives/string.py @@ -23,7 +23,7 @@ from . import Bytes class String(Bytes): @staticmethod - def read(b: BytesIO) -> str: + def read(b: BytesIO, *args) -> str: return super(String, String).read(b).decode() def __new__(cls, value: str) -> bytes: