Use repr() for enum values in Feature.__repr__

This commit is contained in:
Teemu Rytilahti 2025-01-03 19:58:09 +01:00
parent 11bc3322db
commit 524696dd87

View File

@ -295,6 +295,8 @@ class Feature:
if self.precision_hint is not None and isinstance(value, float):
value = round(value, self.precision_hint)
if isinstance(value, Enum):
value = repr(value)
s = f"{self.name} ({self.id}): {value}"
if self.unit is not None:
s += f" {self.unit}"