Skip to content

Commit cb65db5

Browse files
committed
specify defaults for a few fields that fell through the regexes
thanks to [at]kayoub5 for bringing this up! Signed-off-by: Andreas Lauser <[email protected]>
1 parent fa2d31a commit cb65db5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

odxtools/basecomparam.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class BaseComparam(IdentifiableElement):
1818
param_class: str
1919
cptype: StandardizationLevel
2020
display_level: int | None = None
21-
cpusage: Usage | None # Required in ODX 2.2, missing in ODX 2.0
21+
cpusage: Usage | None = None # Required in ODX 2.2, missing in ODX 2.0
2222

2323
@staticmethod
2424
def from_et(et_element: ElementTree.Element, context: OdxDocContext) -> "BaseComparam":

odxtools/specialdata.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
@dataclass(kw_only=True)
1212
class SpecialData:
1313
"""This corresponds to the SD XML tag"""
14-
semantic_info: str | None # the "SI" attribute
15-
text_identifier: str | None # the "TI" attribute, specifies the language used
14+
semantic_info: str | None = None # the "SI" attribute
15+
text_identifier: str | None = None # the "TI" attribute, specifies the language used
1616
value: str
1717

1818
@staticmethod

odxtools/specialdatagroup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SpecialDataGroup:
1616
sdg_caption: SpecialDataGroupCaption | None = None
1717
sdg_caption_ref: OdxLinkRef | None = None
1818
values: list[Union["SpecialDataGroup", SpecialData]] = field(default_factory=list)
19-
semantic_info: str | None # the "SI" attribute
19+
semantic_info: str | None = None # the "SI" attribute
2020

2121
@staticmethod
2222
def from_et(et_element: ElementTree.Element, context: OdxDocContext) -> "SpecialDataGroup":

0 commit comments

Comments
 (0)