mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-13 14:44:28 -04:00
Improve set parameters
This commit is contained in:
parent
22a98e1781
commit
b5af81b744
2 changed files with 5 additions and 1 deletions
|
@ -9,6 +9,8 @@ class HonParameterEnum(HonParameter):
|
|||
self._default = attributes.get("defaultValue")
|
||||
self._value = self._default or "0"
|
||||
self._values: List[str] = attributes.get("enumValues", [])
|
||||
if self._default and self._default not in self._values:
|
||||
self._values.append(self._default)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"{self.__class__} (<{self.key}> {self.values})"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue