2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-01 14:55:12 +00:00

Fix TL schema naming conflicts (#690)

* Avoid variable conflicts with Telegram TL schema

* Fix game button with no data attached to button

* Update combinator.txt

* Update compiler.py

* Update tl_object.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
This commit is contained in:
餅喵
2021-08-28 16:01:12 +08:00
committed by GitHub
parent 6745c9d815
commit 4d933b80f9
4 changed files with 21 additions and 21 deletions

View File

@@ -23,13 +23,13 @@ class {name}(TLObject): # type: ignore
{fields}
@staticmethod
def read(data: BytesIO, *args: Any) -> "{name}":
def read(b: BytesIO, *args: Any) -> "{name}":
{read_types}
return {name}({return_arguments})
def write(self) -> bytes:
data = BytesIO()
data.write(Int(self.ID, False))
b = BytesIO()
b.write(Int(self.ID, False))
{write_types}
return data.getvalue()
return b.getvalue()