Tools: Use ModuleName when determining which modules to compare against XML bindings.

This commit is contained in:
tritao
2025-03-20 11:24:30 +00:00
committed by Benjamin Nauck
parent 3026bd413d
commit 2292f908c5
3 changed files with 3 additions and 1 deletions

View File

@@ -511,6 +511,7 @@ def _parse_class(class_node, source_code: str, path: str, imports_mapping: dict)
py_export = PythonExport(
Documentation=doc_obj,
ModuleName=module_name,
Name=export_decorator_kwargs.get("Name", "") or native_python_class_name,
PythonName=export_decorator_kwargs.get("PythonName", "") or None,
Include=export_decorator_kwargs.get("Include", "") or include,

View File

@@ -181,6 +181,7 @@ class PythonExport:
NoArgs: bool = False
# Attributes
ModuleName: str = ""
Name: str = ""
PythonName: Optional[str] = None
Include: str = ""

View File

@@ -37,7 +37,7 @@ def compareFiles(file1, file2):
class TemplateClassPyExport(template.ModelTemplate):
# TODO: This is temporary, once all XML files are migrated, this can be removed.
def getPath(self, path):
if self.is_python and not self.export.Namespace in ["Base"]:
if self.is_python and not self.export.ModuleName in ["Base"]:
root, ext = os.path.splitext(path)
return f"{root}_{ext}"
return path