From 82695e8e1c7bba4c123304ec6b741c133f12e8a7 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 26 Aug 2022 15:23:26 +0100 Subject: [PATCH] Add db Field.flatchoices (#1128) * Add db Field.flatchoices * @property --- django-stubs/db/models/fields/__init__.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django-stubs/db/models/fields/__init__.pyi b/django-stubs/db/models/fields/__init__.pyi index 40f4227..95e37c5 100644 --- a/django-stubs/db/models/fields/__init__.pyi +++ b/django-stubs/db/models/fields/__init__.pyi @@ -219,6 +219,9 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]): limit_choices_to: Optional[_LimitChoicesTo] = ..., ordering: Sequence[str] = ..., ) -> _ChoicesList: ... + def _get_flatchoices(self) -> List[_Choice]: ... + @property + def flatchoices(self) -> List[_Choice]: ... def has_default(self) -> bool: ... def get_default(self) -> Any: ... def check(self, **kwargs: Any) -> List[CheckMessage]: ...