mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Fix classes MRO and abstractmethod usage
Furthermore utils needs to access the message by reference through types.Message because it is patched and replaced.
This commit is contained in:
@@ -3,7 +3,7 @@ import struct
|
||||
from datetime import datetime, date, timedelta
|
||||
|
||||
|
||||
class TLObject(abc.ABC):
|
||||
class TLObject:
|
||||
CONSTRUCTOR_ID = None
|
||||
SUBCLASS_OF_ID = None
|
||||
|
||||
@@ -141,21 +141,18 @@ class TLObject(abc.ABC):
|
||||
def stringify(self):
|
||||
return TLObject.pretty_format(self, indent=0)
|
||||
|
||||
@abc.abstractmethod
|
||||
def to_dict(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def __bytes__(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@classmethod
|
||||
@abc.abstractmethod
|
||||
def from_reader(cls, reader):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class TLRequest(abc.ABC, TLObject):
|
||||
class TLRequest(TLObject):
|
||||
"""
|
||||
Represents a content-related `TLObject` (a request that can be sent).
|
||||
"""
|
||||
|
Reference in New Issue
Block a user