chore: sets number slider type hints to Any

This removes mypy type errors when overwriting the properties in a
derived class.
This commit is contained in:
Mose Müller 2024-12-19 10:02:40 +01:00
parent 10f1b8691c
commit a0c3882f35

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