Tools: Use ModuleName when determining which modules to compare against XML bindings.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -181,6 +181,7 @@ class PythonExport:
|
||||
NoArgs: bool = False
|
||||
|
||||
# Attributes
|
||||
ModuleName: str = ""
|
||||
Name: str = ""
|
||||
PythonName: Optional[str] = None
|
||||
Include: str = ""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user