Fix PyDoc: Invalid signature for functions without arguments
Ref: !130031
This commit is contained in:
@@ -1893,7 +1893,7 @@ def pyrna2sphinx(basepath):
|
||||
for op in ops_mod:
|
||||
args_str = ", ".join(prop.get_arg_default(force=True) for prop in op.args)
|
||||
# All operator arguments are keyword only (denoted by the leading `*`).
|
||||
fw(".. function:: {:s}(*, {:s})\n\n".format(op.func_name, args_str))
|
||||
fw(".. function:: {:s}({:s}{:s})\n\n".format(op.func_name, "*, " if args_str else "", args_str))
|
||||
|
||||
# If the description isn't valid, we output the standard warning
|
||||
# with a link to the wiki so that people can help.
|
||||
|
||||
Reference in New Issue
Block a user