mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 13:04:47 +08:00
update ChoiceField's choices kwarg's annotation (#273)
per the [docs](https://docs.djangoproject.com/en/3.0/ref/forms/fields/#choicefield), `choices` is: > Either an iterable of 2-tuples to use as choices for this field, or a callable that returns such an iterable.
This commit is contained in:
committed by
Maksim Kurnikov
parent
f7e1cfc6c7
commit
031d42a75d
@@ -207,7 +207,7 @@ class CallableChoiceIterator:
|
|||||||
class ChoiceField(Field):
|
class ChoiceField(Field):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
choices: _FieldChoices = ...,
|
choices: Union[_FieldChoices, Callable[[], _FieldChoices]] = ...,
|
||||||
required: bool = ...,
|
required: bool = ...,
|
||||||
widget: Optional[Union[Widget, Type[Widget]]] = ...,
|
widget: Optional[Union[Widget, Type[Widget]]] = ...,
|
||||||
label: Optional[Any] = ...,
|
label: Optional[Any] = ...,
|
||||||
|
|||||||
Reference in New Issue
Block a user