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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user