Skip to content

Commit

Permalink
Fixing template due to issues when attribute not used
Browse files Browse the repository at this point in the history
Signed-off-by: HUG0-D <[email protected]>
  • Loading branch information
HUG0-D committed Oct 30, 2024
1 parent 084aaf3 commit f961f78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ output/
*.py[cod]
__pycache__/
.vscode/*
tests/
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ class {{class_name}}({{sub_class_of}}):
{{#attributes}}
{{^isAssociationUsed}}# *Association not used*
# Type {{dataType}} in CIM
# {{/isAssociationUsed}}{{label}} : {{#setType}}{{dataType}}{{/setType}} = Field({{#setDefault}}{{dataType}}{{/setDefault}}, {{#setCimDataType}}{{.}}{{/setCimDataType}} json_schema_extra={"in_profiles":[{{#attr_origin}}Profile.{{origin}}, {{/attr_origin}}]}) {{^isAssociationUsed}}# noqa: E501{{/isAssociationUsed}}
# {{/isAssociationUsed}}{{label}} : {{#setType}}{{dataType}}{{/setType}} = Field({{#setDefault}}{{dataType}}{{/setDefault}}, json_schema_extra={"in_profiles":[{{#attr_origin}}Profile.{{origin}},{{/attr_origin}}],{{#setCimDataType}}{{.}}{{/setCimDataType}}}){{^isAssociationUsed}} # noqa: E501{{/isAssociationUsed}}

{{/attributes}}
{{^attributes}}
# No attributes defined for this class.
{{/attributes}}


@cached_property
def possible_profiles(self)->set[BaseProfile]:
"""
Expand Down

0 comments on commit f961f78

Please sign in to comment.