Add __slots__ to Telegram TL types · dotlambda/pyrogram@6bd9ddc · GitHub
Skip to content

Commit 6bd9ddc

Browse files
committed
Add __slots__ to Telegram TL types
1 parent c3470b2 commit 6bd9ddc

3 files changed

Lines changed: 26 additions & 30 deletions

File tree

compiler/api/compiler.py

Lines changed: 3 additions & 1 deletion

compiler/api/template/mtproto.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ class {class_name}(Object):
99
"""{docstring_args}
1010
"""
1111

12+
__slots__ = [{slots}]
13+
1214
ID = {object_id}
15+
QUALNAME = "{qualname}"
1316

1417
def __init__(self{arguments}):
1518
{fields}

pyrogram/api/core/object.py

Lines changed: 20 additions & 29 deletions

0 commit comments

Comments
 (0)