diff --git a/cimgen/languages/modernpython/lang_pack.py b/cimgen/languages/modernpython/lang_pack.py index 2f742080..ed10ed9c 100644 --- a/cimgen/languages/modernpython/lang_pack.py +++ b/cimgen/languages/modernpython/lang_pack.py @@ -108,7 +108,7 @@ def _primitive_to_data_type(datatype): def _set_imports(attributes): classes = set() for attribute in attributes: - if attribute["is_cim_datatype"] or attribute["is_primitive_attribute"]: + if attribute["is_datatype_attribute"] or attribute["is_primitive_attribute"]: classes.add(attribute["attribute_class"]) result = "" @@ -146,7 +146,7 @@ def _compute_cim_data_type(attributes) -> dict: def _set_cim_data_type(text, render) -> str: attribute = eval(render(text)) cim_data_type = "" - if attribute["is_cim_datatype"] or attribute["is_primitive_attribute"]: + if attribute["is_datatype_attribute"] or attribute["is_primitive_attribute"]: cim_data_type += "\n " cim_data_type += """"cim_data_type": """ + attribute["attribute_class"] + "," return cim_data_type diff --git a/cimgen/languages/modernpython/templates/cimpy_class_template.mustache b/cimgen/languages/modernpython/templates/cimpy_class_template.mustache index bb91f643..66cc3875 100644 --- a/cimgen/languages/modernpython/templates/cimpy_class_template.mustache +++ b/cimgen/languages/modernpython/templates/cimpy_class_template.mustache @@ -36,7 +36,7 @@ class {{class_name}}({{sub_class_of}}): "is_enum_attribute": {{#is_enum_attribute}}True{{/is_enum_attribute}}{{^is_enum_attribute}}False{{/is_enum_attribute}}, "is_list_attribute": {{#is_list_attribute}}True{{/is_list_attribute}}{{^is_list_attribute}}False{{/is_list_attribute}}, "is_primitive_attribute": {{#is_primitive_attribute}}True{{/is_primitive_attribute}}{{^is_primitive_attribute}}False{{/is_primitive_attribute}}, - "is_cim_datatype": {{#is_cim_datatype}}True{{/is_cim_datatype}}{{^is_cim_datatype}}False{{/is_cim_datatype}},{{#setCimDataType}}{{.}}{{/setCimDataType}} + "is_datatype_attribute": {{#is_datatype_attribute}}True{{/is_datatype_attribute}}{{^is_datatype_attribute}}False{{/is_datatype_attribute}},{{#setCimDataType}}{{.}}{{/setCimDataType}} }, )