Skip to content

Commit 849321e

Browse files
committed
Remove unneeded parts
1 parent 2017493 commit 849321e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

compiler/api/compiler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,14 +361,12 @@ def start(format: bool = False):
361361

362362
for i, arg in enumerate(sorted_args):
363363
arg_name, arg_type = arg
364-
is_optional = FLAGS_RE.match(arg_type)
365-
flag_number = is_optional.group(1) if is_optional else -1
366364
arg_type = arg_type.split("?")[-1]
367365

368366
docstring_args.append(
369367
"{}{}: {}".format(
370368
arg_name,
371-
" (optional)".format(flag_number) if is_optional else "",
369+
" (optional)",
372370
get_docstring_arg_type(arg_type, is_pyrogram_type=c.namespace == "pyrogram")
373371
)
374372
)
@@ -413,7 +411,8 @@ def start(format: bool = False):
413411
if flag.group(3) == "true" or flag.group(3).startswith("Vector"):
414412
write_flags.append(f"{arg_name} |= (1 << {flag.group(2)}) if self.{i[0]} else 0")
415413
else:
416-
write_flags.append(f"{arg_name} |= (1 << {flag.group(2)}) if self.{i[0]} is not None else 0")
414+
write_flags.append(
415+
f"{arg_name} |= (1 << {flag.group(2)}) if self.{i[0]} is not None else 0")
417416

418417
write_flags = "\n ".join([
419418
f"{arg_name} = 0",

0 commit comments

Comments
 (0)