Fix for float steps #22

This commit is contained in:
Andre Basche 2024-02-04 03:39:06 +01:00
parent 3acd12f345
commit 8a46bd4b53

View file

@ -69,4 +69,11 @@ class HonParameterRange(HonParameter):
@property
def values(self) -> List[str]:
if isinstance(self.step, float):
result = []
i = self.min
while i <= self.max:
i += self.step
result.append(str(i))
return result
return [str(i) for i in range(int(self.min), int(self.max) + 1, int(self.step))]