mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 12:14:28 +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):
|
||||
def __init__(
|
||||
self,
|
||||
choices: _FieldChoices = ...,
|
||||
choices: Union[_FieldChoices, Callable[[], _FieldChoices]] = ...,
|
||||
required: bool = ...,
|
||||
widget: Optional[Union[Widget, Type[Widget]]] = ...,
|
||||
label: Optional[Any] = ...,
|
||||
|
||||
Reference in New Issue
Block a user