From 09d0ebe6e56a1439847608fab2b39ee4cee0bc97 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:51:49 +0100 Subject: [PATCH] fix: removing extra comas at the end of the command --- src/pyconverter/xml2py/ast_tree.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyconverter/xml2py/ast_tree.py b/src/pyconverter/xml2py/ast_tree.py index 7a153892e..fee95c948 100644 --- a/src/pyconverter/xml2py/ast_tree.py +++ b/src/pyconverter/xml2py/ast_tree.py @@ -2979,6 +2979,8 @@ def py_source(self, custom_functions=None, indent=""): command += arg.py_arg_name command += "}" command += '"\n' + while command != command.replace(',"', '"'): # remove extra commas at the end of the command + command = command.replace(',"', '"') # ",{" + "},{".join(self.arg_desc.py_arg_name) + '}"\n' else: command = 'command = f"' + self.name + '"\n'