mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Rename constructor/subclass_of_id to upper case, keep only static
This commit is contained in:
@@ -5,7 +5,7 @@ from . import TLObject
|
||||
|
||||
|
||||
class GzipPacked(TLObject):
|
||||
constructor_id = 0x3072cfa1
|
||||
CONSTRUCTOR_ID = 0x3072cfa1
|
||||
|
||||
def __init__(self, data):
|
||||
super().__init__()
|
||||
@@ -29,7 +29,7 @@ class GzipPacked(TLObject):
|
||||
|
||||
def to_bytes(self):
|
||||
# TODO Maybe compress level could be an option
|
||||
return struct.pack('<I', GzipPacked.constructor_id) + \
|
||||
return struct.pack('<I', GzipPacked.CONSTRUCTOR_ID) + \
|
||||
TLObject.serialize_bytes(gzip.compress(self.data))
|
||||
|
||||
@staticmethod
|
||||
|
Reference in New Issue
Block a user