Fix errors in xml_parser and rerun
parent
0db2a0d16b
commit
7f62e8c65e
|
@ -56,9 +56,14 @@ class XMLDocParser:
|
||||||
documenting_index = self.determine_documenting_index(
|
documenting_index = self.determine_documenting_index(
|
||||||
cpp_class, cpp_method, method_args_names, member_defs)
|
cpp_class, cpp_method, method_args_names, member_defs)
|
||||||
|
|
||||||
|
if member_defs:
|
||||||
|
self.print_if_verbose(
|
||||||
|
f"Extracted {len(member_defs)} member definitions for {cpp_class}.{cpp_method}."
|
||||||
|
)
|
||||||
|
|
||||||
# Extract the docs for the function that matches cpp_class.cpp_method(*method_args_names).
|
# Extract the docs for the function that matches cpp_class.cpp_method(*method_args_names).
|
||||||
return self.get_formatted_docstring(member_defs[documenting_index],
|
return self.get_formatted_docstring(member_defs[documenting_index],
|
||||||
ignored_params)
|
ignored_params) if member_defs else ""
|
||||||
|
|
||||||
def get_member_defs(self, xml_folder: str, cpp_class: str,
|
def get_member_defs(self, xml_folder: str, cpp_class: str,
|
||||||
cpp_method: str):
|
cpp_method: str):
|
||||||
|
@ -95,7 +100,7 @@ class XMLDocParser:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
# Create the path to the file with the documentation for cpp_class.
|
# Create the path to the file with the documentation for cpp_class.
|
||||||
xml_class_file = xml_folder_path / class_index.attrib['refid'] + '.xml'
|
xml_class_file = xml_folder_path / f"{class_index.attrib['refid']}.xml"
|
||||||
|
|
||||||
# Parse the class file
|
# Parse the class file
|
||||||
class_tree = self.parse_xml(xml_class_file)
|
class_tree = self.parse_xml(xml_class_file)
|
||||||
|
|
Loading…
Reference in New Issue