Skip to content

Commit b8b2396

Browse files
committed
fix: custom_functions calls
1 parent 9820b64 commit b8b2396

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/pyconverter/xml2py/ast_tree.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2805,7 +2805,9 @@ def py_notes(self, custom_functions: CustomFunctions = None):
28052805
else:
28062806
lines.append(notes)
28072807

2808-
if custom_functions is not None and self.py_name in custom_functions.py_notes:
2808+
if custom_functions is not None and (
2809+
self.py_name in custom_functions.py_names and self.py_name in custom_functions.py_notes
2810+
):
28092811
if len("\n".join(lines)) < len("\n".join(custom_functions.py_notes[self.py_name])):
28102812
lines = custom_functions.py_notes[self.py_name]
28112813

@@ -2860,7 +2862,9 @@ def py_parm(self, custom_functions=None, indent="", links=None, base_url=None, f
28602862
if len(arg_desc) > 0:
28612863
lines.append("Parameters")
28622864

2863-
if custom_functions is not None and self.py_name in custom_functions.py_names:
2865+
if custom_functions is not None and (
2866+
self.py_name in custom_functions.py_names and self.py_name in custom_functions.py_args
2867+
):
28642868
initial_py_arg_list = [argument.py_arg_name for argument in arg_desc]
28652869
if set(custom_functions.py_args[self.py_name]) == set(initial_py_arg_list):
28662870
if len(arg_desc) > 0:

0 commit comments

Comments
 (0)