Skip to content

Commit 22d9222

Browse files
committed
only use 'E' prefix when not a 'service' DataElement
1 parent 84337ce commit 22d9222

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/generator/specs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class DataElementSpec:
2525
stub: bool = False
2626

2727
def class_name(self) -> str:
28-
return to_class_name(self.title, "E") # type: ignore
28+
"""Returns a Python class name that can be used as a dataclass."""
29+
prefix = "E" if int(self.code) >= 1000 else ""
30+
return to_class_name(self.title, prefix)
2931

3032
@property
3133
def identifier(self) -> str:

0 commit comments

Comments
 (0)