mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 13:14:31 +03:00
Fix optional vector arguments failing
This commit is contained in:
parent
3fda7efeb9
commit
423efc4360
|
@ -392,14 +392,13 @@ class TLGenerator:
|
||||||
a parameter upon creating the request. Returns False otherwise
|
a parameter upon creating the request. Returns False otherwise
|
||||||
"""
|
"""
|
||||||
if arg.is_vector:
|
if arg.is_vector:
|
||||||
builder.writeln(
|
builder.write('self.{0} = [{1}(_x) for _x in {0}]'
|
||||||
'self.{0} = [{1}(_x) for _x in {0}]'
|
.format(arg.name, get_input_code))
|
||||||
.format(arg.name, get_input_code)
|
|
||||||
)
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
|
builder.write('self.{0} = {1}({0})'
|
||||||
|
.format(arg.name, get_input_code))
|
||||||
builder.writeln(
|
builder.writeln(
|
||||||
'self.{0} = {1}({0})'.format(arg.name, get_input_code)
|
' if {} else None'.format(arg.name) if arg.is_flag else ''
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue
Block a user