Update compiler
This commit is contained in:
parent
398858acc1
commit
1f683ba00e
@ -283,20 +283,21 @@ def start():
|
|||||||
flag_number = is_optional.group(1) if is_optional else -1
|
flag_number = is_optional.group(1) if is_optional else -1
|
||||||
arg_type = arg_type.split("?")[-1]
|
arg_type = arg_type.split("?")[-1]
|
||||||
|
|
||||||
if docs:
|
# if c.namespace == "pyrogram":
|
||||||
|
# docstring_args.append(
|
||||||
|
# "{} ({}{}):\n {}\n".format(
|
||||||
|
# arg_name,
|
||||||
|
# get_docstring_arg_type(arg_type, is_pyrogram_type=True),
|
||||||
|
# ", optional" if "Optional" in docs[i] else "",
|
||||||
|
# re.sub("Optional\. ", "", docs[i].split("§")[1].rstrip(".") + ".")
|
||||||
|
# )
|
||||||
|
# )
|
||||||
|
# else:
|
||||||
|
|
||||||
docstring_args.append(
|
docstring_args.append(
|
||||||
"{} ({}{}):\n {}\n".format(
|
"{}{}: {}".format(
|
||||||
arg_name,
|
arg_name,
|
||||||
get_docstring_arg_type(arg_type, is_pyrogram_type=True),
|
" (optional)".format(flag_number) if is_optional else "",
|
||||||
", optional" if "Optional" in docs[i] else "",
|
|
||||||
re.sub("Optional\. ", "", docs[i].split("§")[1].rstrip(".") + ".")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
docstring_args.append(
|
|
||||||
"{}: {}{}".format(
|
|
||||||
arg_name,
|
|
||||||
"``optional`` ".format(flag_number) if is_optional else "",
|
|
||||||
get_docstring_arg_type(arg_type, is_pyrogram_type=c.namespace == "pyrogram")
|
get_docstring_arg_type(arg_type, is_pyrogram_type=c.namespace == "pyrogram")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user