Fix Parameter setter type checks
@@ -80,7 +80,9 @@ class Parameter:
@name.setter
def name(self, val):
- self._name = str(val)
+ if not isinstance(val, str):
+ raise TypeError(f"Invalid type: {val}, {type(val)}")
+ self._name = val
@property
def factor(self):
@@ -150,7 +152,9 @@ class Parameter:
@frozen.setter
def frozen(self, val):
- self._frozen = bool(val)
+ if not isinstance(val, bool):
+ raise TypeError(f"Invalid type: {val}, {type(val)}")
+ self._frozen = val
@property
def value(self):
