mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 22:41:55 +08:00
Allow float for min_value and max_value of FloatField (#1081)
Co-authored-by: Thibaut <thibaut.d@hellowatt.fr>
This commit is contained in:
@@ -115,6 +115,23 @@ class IntegerField(Field):
|
|||||||
def widget_attrs(self, widget: Widget) -> Dict[str, Any]: ...
|
def widget_attrs(self, widget: Widget) -> Dict[str, Any]: ...
|
||||||
|
|
||||||
class FloatField(IntegerField):
|
class FloatField(IntegerField):
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
max_value: Union[int, float, None] = ...,
|
||||||
|
min_value: Union[int, float, None] = ...,
|
||||||
|
required: bool = ...,
|
||||||
|
widget: Optional[Union[Widget, Type[Widget]]] = ...,
|
||||||
|
label: Optional[str] = ...,
|
||||||
|
initial: Optional[Any] = ...,
|
||||||
|
help_text: str = ...,
|
||||||
|
error_messages: Optional[_ErrorMessagesT] = ...,
|
||||||
|
show_hidden_initial: bool = ...,
|
||||||
|
validators: Sequence[_ValidatorCallable] = ...,
|
||||||
|
localize: bool = ...,
|
||||||
|
disabled: bool = ...,
|
||||||
|
label_suffix: Optional[str] = ...,
|
||||||
|
) -> None: ...
|
||||||
def to_python(self, value: Optional[Any]) -> Optional[float]: ... # type: ignore
|
def to_python(self, value: Optional[Any]) -> Optional[float]: ... # type: ignore
|
||||||
def validate(self, value: float) -> None: ...
|
def validate(self, value: float) -> None: ...
|
||||||
def widget_attrs(self, widget: Widget) -> Dict[str, Any]: ...
|
def widget_attrs(self, widget: Widget) -> Dict[str, Any]: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user