Merge pull request #195 from tiqi-group/chore/set_number_slider_types_to_any

chore: sets number slider type hints to Any
This commit is contained in:
Mose Müller 2024-12-19 10:11:07 +01:00 committed by GitHub
commit b7818c0d8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,11 +13,11 @@ class NumberSlider(DataService):
Args: Args:
value: value:
The initial value of the slider. Defaults to 0. The initial value of the slider. Defaults to 0.0.
min_: min_:
The minimum value of the slider. Defaults to 0. The minimum value of the slider. Defaults to 0.0.
max_: max_:
The maximum value of the slider. Defaults to 100. The maximum value of the slider. Defaults to 100.0.
step_size: step_size:
The increment/decrement step size of the slider. Defaults to 1.0. The increment/decrement step size of the slider. Defaults to 1.0.
@ -84,9 +84,9 @@ class NumberSlider(DataService):
def __init__( def __init__(
self, self,
value: Any = 0.0, value: Any = 0.0,
min_: float = 0.0, min_: Any = 0.0,
max_: float = 100.0, max_: Any = 100.0,
step_size: float = 1.0, step_size: Any = 1.0,
) -> None: ) -> None:
super().__init__() super().__init__()
self._step_size = step_size self._step_size = step_size
@ -95,17 +95,17 @@ class NumberSlider(DataService):
self._max = max_ self._max = max_
@property @property
def min(self) -> float: def min(self) -> Any:
"""The min property.""" """The min property."""
return self._min return self._min
@property @property
def max(self) -> float: def max(self) -> Any:
"""The min property.""" """The min property."""
return self._max return self._max
@property @property
def step_size(self) -> float: def step_size(self) -> Any:
"""The min property.""" """The min property."""
return self._step_size return self._step_size