Move BLANK_CHOICE to django.db.models.fields (#242)

This commit is contained in:
Youssef Moussaoui
2019-12-07 21:19:24 -08:00
committed by Nikita Sobolev
parent 540e28f4c6
commit 9ca79c24a2
2 changed files with 3 additions and 3 deletions

View File

@@ -27,6 +27,8 @@ from django.forms import Field as FormField, Widget
class NOT_PROVIDED: ... class NOT_PROVIDED: ...
BLANK_CHOICE_DASH: List[Tuple[str, str]] = ...
_Choice = Tuple[Any, Any] _Choice = Tuple[Any, Any]
_ChoiceNamedGroup = Tuple[str, Iterable[_Choice]] _ChoiceNamedGroup = Tuple[str, Iterable[_Choice]]
_FieldChoices = Iterable[Union[_Choice, _ChoiceNamedGroup]] _FieldChoices = Iterable[Union[_Choice, _ChoiceNamedGroup]]

View File

@@ -1,5 +1,5 @@
from pathlib import Path from pathlib import Path
from typing import Any, Callable, Iterable, List, Optional, Tuple, Type, TypeVar, Union, overload from typing import Any, Callable, Iterable, Optional, Type, TypeVar, Union, overload
from django.core.files.base import File from django.core.files.base import File
from django.core.files.images import ImageFile from django.core.files.images import ImageFile
@@ -8,8 +8,6 @@ from django.db.models.base import Model
from django.db.models.fields import Field, _FieldChoices, _ValidatorCallable, _ErrorMessagesToOverride from django.db.models.fields import Field, _FieldChoices, _ValidatorCallable, _ErrorMessagesToOverride
BLANK_CHOICE_DASH: List[Tuple[str, str]] = ...
class FieldFile(File): class FieldFile(File):
instance: Model = ... instance: Model = ...
field: FileField = ... field: FileField = ...