r"""Range input. :param int/float value: The initial value of the slider. :param int/float min_value: The minimum permitted value. :param int/float max_value: The maximum permitted value. :param int step: The stepping interval. Only available when ``value``, ``min_value`` and
(label: str = '', *, name: str = None, value: Union[int, float] = 0, min_value: Union[int, float] = 0,
max_value: Union[int, float] = 100, step: int = 1, validate: Callable[[Any], Optional[str]] = None,
onchange: Callable[[Any], None] = None, required: bool = None, help_text: str = None, **other_html_attrs)
| 653 | |
| 654 | |
| 655 | def slider(label: str = '', *, name: str = None, value: Union[int, float] = 0, min_value: Union[int, float] = 0, |
| 656 | max_value: Union[int, float] = 100, step: int = 1, validate: Callable[[Any], Optional[str]] = None, |
| 657 | onchange: Callable[[Any], None] = None, required: bool = None, help_text: str = None, **other_html_attrs): |
| 658 | r"""Range input. |
| 659 | |
| 660 | :param int/float value: The initial value of the slider. |
| 661 | :param int/float min_value: The minimum permitted value. |
| 662 | :param int/float max_value: The maximum permitted value. |
| 663 | :param int step: The stepping interval. |
| 664 | Only available when ``value``, ``min_value`` and ``max_value`` are all integer. |
| 665 | :param - label, name, validate, onchange, required, help_text, other_html_attrs: Those arguments have the same meaning as for `input()` |
| 666 | :return int/float: If one of ``value``, ``min_value`` and ``max_value`` is float, |
| 667 | the return value is a float, otherwise an int is returned. |
| 668 | """ |
| 669 | item_spec, valid_func, onchange_func = _parse_args(locals()) |
| 670 | item_spec['type'] = 'slider' |
| 671 | item_spec['float'] = any(isinstance(i, float) for i in (value, min_value, max_value)) |
| 672 | if item_spec['float']: |
| 673 | item_spec['step'] = 'any' |
| 674 | |
| 675 | return single_input(item_spec, valid_func, lambda d: d, onchange_func) |
| 676 | |
| 677 | |
| 678 | def input_group(label: str = '', inputs: List = None, validate: Callable[[Dict], Optional[Tuple[str, str]]] = None, |
no test coverage detected
searching dependent graphs…