mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix assertion for multiple same flag parameters
This commit is contained in:
parent
c218df87d7
commit
b11c2e885b
|
@ -311,8 +311,10 @@ class TLGenerator:
|
||||||
|
|
||||||
for ra in repeated_args.values():
|
for ra in repeated_args.values():
|
||||||
if len(ra) > 1:
|
if len(ra) > 1:
|
||||||
cnd1 = ('self.{}'.format(a.name) for a in ra)
|
cnd1 = ('(self.{0} or self.{0} is not None)'
|
||||||
cnd2 = ('not self.{}'.format(a.name) for a in ra)
|
.format(a.name) for a in ra)
|
||||||
|
cnd2 = ('(self.{0} is None or self.{0} is False)'
|
||||||
|
.format(a.name) for a in ra)
|
||||||
builder.writeln(
|
builder.writeln(
|
||||||
"assert ({}) or ({}), '{} parameters must all "
|
"assert ({}) or ({}), '{} parameters must all "
|
||||||
"be False-y (like None) or all me True-y'".format(
|
"be False-y (like None) or all me True-y'".format(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user