mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 05:04:33 +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():
|
||||
if len(ra) > 1:
|
||||
cnd1 = ('self.{}'.format(a.name) for a in ra)
|
||||
cnd2 = ('not self.{}'.format(a.name) for a in ra)
|
||||
cnd1 = ('(self.{0} or self.{0} is not None)'
|
||||
.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(
|
||||
"assert ({}) or ({}), '{} parameters must all "
|
||||
"be False-y (like None) or all me True-y'".format(
|
||||
|
|
Loading…
Reference in New Issue
Block a user