mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
fix: NumberSlider init function
This commit is contained in:
parent
db3f0977c2
commit
c138dc405f
@ -45,16 +45,15 @@ class NumberSlider(DataService):
|
|||||||
step_size: float | int = 1.0,
|
step_size: float | int = 1.0,
|
||||||
type: Literal["int"] | Literal["float"] = "float",
|
type: Literal["int"] | Literal["float"] = "float",
|
||||||
) -> None:
|
) -> None:
|
||||||
self.min = min
|
|
||||||
self.max = max
|
|
||||||
self.step_size = step_size
|
|
||||||
|
|
||||||
if type not in {"float", "int"}:
|
if type not in {"float", "int"}:
|
||||||
logger.error(f"Unknown type '{type}'. Using 'float'.")
|
logger.error(f"Unknown type '{type}'. Using 'float'.")
|
||||||
type = "float"
|
type = "float"
|
||||||
|
|
||||||
self._type = type
|
self._type = type
|
||||||
|
self.step_size = step_size
|
||||||
self.value = value
|
self.value = value
|
||||||
|
self.min = min
|
||||||
|
self.max = max
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user