mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Fix extra line being appended on empty .to_dict()'s
This commit is contained in:
@@ -312,8 +312,8 @@ class TLGenerator:
|
|||||||
builder.end_block()
|
builder.end_block()
|
||||||
|
|
||||||
# Write the to_dict(self) method
|
# Write the to_dict(self) method
|
||||||
builder.writeln('def to_dict(self):')
|
|
||||||
if args:
|
if args:
|
||||||
|
builder.writeln('def to_dict(self):')
|
||||||
builder.writeln('return {')
|
builder.writeln('return {')
|
||||||
builder.current_indent += 1
|
builder.current_indent += 1
|
||||||
|
|
||||||
@@ -345,11 +345,12 @@ class TLGenerator:
|
|||||||
builder.writeln(',')
|
builder.writeln(',')
|
||||||
|
|
||||||
builder.current_indent -= 1
|
builder.current_indent -= 1
|
||||||
builder.write("}")
|
builder.writeln("}")
|
||||||
else:
|
else:
|
||||||
|
builder.writeln('@staticmethod')
|
||||||
|
builder.writeln('def to_dict():')
|
||||||
builder.writeln('return {}')
|
builder.writeln('return {}')
|
||||||
|
|
||||||
builder.writeln()
|
|
||||||
builder.end_block()
|
builder.end_block()
|
||||||
|
|
||||||
# Write the on_send(self, writer) function
|
# Write the on_send(self, writer) function
|
||||||
|
Reference in New Issue
Block a user