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:
JR Heard
2019-12-13 22:30:50 -08:00
committed by Maksim Kurnikov
parent f7e1cfc6c7
commit 031d42a75d

View File

@@ -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] = ...,