PyDoc: use :param: instead of :arg: in Sphinx docstrings

While "arg" isn't deprecated "param" is preferred and used in all
Sphinx's examples & tutorials.

Ref !154039
This commit is contained in:
Campbell Barton 2026-02-07 09:03:36 +11:00
parent 40298aa015
commit 791505e2ed
96 changed files with 1131 additions and 1120 deletions

View file

@ -400,7 +400,7 @@ def main():
# -- done
# all ops get this arg
fw(" :arg bm: The bmesh to operate on.\n")
fw(" :param bm: The bmesh to operate on.\n")
fw(" :type bm: :class:`bmesh.types.BMesh`\n")
args_out_wash = get_args_wash(args_out, args_out_index, True)
@ -410,7 +410,7 @@ def main():
comment = "Undocumented."
# Indent a block to support multiple lines.
fw(" :arg {:s}:\n{:s}\n".format(name, textwrap.indent(comment, " ")))
fw(" :param {:s}:\n{:s}\n".format(name, textwrap.indent(comment, " ")))
fw(" :type {:s}: {:s}\n".format(name, tp))
if args_out_wash:

View file

@ -1523,7 +1523,7 @@ def pyrna2sphinx(basepath):
kwargs = {"as_ret": True}
identifier = ""
else:
id_name = "arg"
id_name = "param"
id_type = "type"
kwargs = {"as_arg": True}
identifier = " {:s}".format(prop.identifier)