mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Update API compiler
This commit is contained in:
parent
ddb8c9e595
commit
b1b04b5768
1 changed files with 4 additions and 4 deletions
|
|
@ -41,12 +41,12 @@ constructors_to_functions = {}
|
||||||
def get_docstring_arg_type(t: str, is_list: bool = False):
|
def get_docstring_arg_type(t: str, is_list: bool = False):
|
||||||
if t in core_types:
|
if t in core_types:
|
||||||
if t == "long":
|
if t == "long":
|
||||||
return ":obj:`int`:obj:`64-bit`"
|
return ":obj:`int` :obj:`64-bit`"
|
||||||
elif "int" in t:
|
elif "int" in t:
|
||||||
size = INT_RE.match(t)
|
size = INT_RE.match(t)
|
||||||
return ":obj:`int`:obj:`{}-bit`".format(size.group(1)) if size else ":obj:`int`:obj:`32-bit`"
|
return ":obj:`int` :obj:`{}-bit`".format(size.group(1)) if size else ":obj:`int` :obj:`32-bit`"
|
||||||
elif t == "double":
|
elif t == "double":
|
||||||
return ":obj:`float`:obj:`64-bit`"
|
return ":obj:`float` :obj:`64-bit`"
|
||||||
elif t == "string":
|
elif t == "string":
|
||||||
return ":obj:`str`"
|
return ":obj:`str`"
|
||||||
else:
|
else:
|
||||||
|
|
@ -264,7 +264,7 @@ def start():
|
||||||
docstring_args.append(
|
docstring_args.append(
|
||||||
"{}: {}{}".format(
|
"{}: {}{}".format(
|
||||||
arg_name,
|
arg_name,
|
||||||
"(optional {}) ".format(flag_number) if is_optional else "",
|
"``optional.{}``".format(flag_number) if is_optional else "",
|
||||||
get_docstring_arg_type(arg_type)
|
get_docstring_arg_type(arg_type)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue