From a5d391919c6fffa56fcbf73f13b5ca818e7af175 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 8 Dec 2022 12:31:42 +1100 Subject: [PATCH] Cleanup: format --- doc/python_api/rst_from_bmesh_opdefines.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/python_api/rst_from_bmesh_opdefines.py b/doc/python_api/rst_from_bmesh_opdefines.py index c7b640227c8..3b7093f0156 100644 --- a/doc/python_api/rst_from_bmesh_opdefines.py +++ b/doc/python_api/rst_from_bmesh_opdefines.py @@ -234,7 +234,7 @@ def main(): args_in_index[:] = [i for (i, a) in enumerate(args_in) if type(a) == tuple] if args_out is not None: args_out_index[:] = [i for (i, a) in enumerate(args_out) if type(a) == tuple] - + # get the args def get_args_wash(args, args_index, is_ret): args_wash = [] @@ -369,7 +369,7 @@ def main(): # end get_args_wash args_in_wash = get_args_wash(args_in, args_in_index, False) - + fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([print_arg_in(arg) for arg in args_in_wash]))) # -- wash the comment @@ -391,7 +391,6 @@ def main(): fw("\n") # -- done - # all ops get this arg fw(" :arg bm: The bmesh to operate on.\n") fw(" :type bm: :class:`bmesh.types.BMesh`\n") @@ -423,11 +422,13 @@ def main(): del fout print(OUT_RST) + def print_arg_in(arg): (name, default_value, _, _) = arg if default_value is None: return name return name + '=' + default_value + if __name__ == "__main__": main()