From 08e94451e4467fa2e3eeadfbf1721ffe788df072 Mon Sep 17 00:00:00 2001 From: "Tristan.BrousseauRigaudie" Date: Tue, 6 Jan 2026 16:50:35 -0500 Subject: [PATCH] Set enumeration as a subclass of Arrayable --- pythonfmu3/variables.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pythonfmu3/variables.py b/pythonfmu3/variables.py index c3aba08..c2ee44e 100644 --- a/pythonfmu3/variables.py +++ b/pythonfmu3/variables.py @@ -391,9 +391,10 @@ def to_xml(self) -> Element: return parent -class Enumeration(ModelVariable): - def __init__(self, name: str, start: Optional[Any] = None, declared_type: Optional[Any] = None, **kwargs): - super().__init__(name, **kwargs) +class Enumeration(ModelVariable, Arrayable): + def __init__(self, name: str, start: Optional[Any] = None, declared_type: Optional[Any] = None, dimensions: List[Dimension] = [], **kwargs): + ModelVariable.__init__(self, name, **kwargs) + Arrayable.__init__(self, dimensions, **kwargs) self.__attrs = {"start": start, "declaredType": declared_type} self._type = "Enumeration"