mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 20:24:31 +08:00
Move BLANK_CHOICE to django.db.models.fields (#242)
This commit is contained in:
committed by
Nikita Sobolev
parent
540e28f4c6
commit
9ca79c24a2
@@ -27,6 +27,8 @@ from django.forms import Field as FormField, Widget
|
||||
|
||||
class NOT_PROVIDED: ...
|
||||
|
||||
BLANK_CHOICE_DASH: List[Tuple[str, str]] = ...
|
||||
|
||||
_Choice = Tuple[Any, Any]
|
||||
_ChoiceNamedGroup = Tuple[str, Iterable[_Choice]]
|
||||
_FieldChoices = Iterable[Union[_Choice, _ChoiceNamedGroup]]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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.images import ImageFile
|
||||
@@ -8,8 +8,6 @@ from django.db.models.base import Model
|
||||
|
||||
from django.db.models.fields import Field, _FieldChoices, _ValidatorCallable, _ErrorMessagesToOverride
|
||||
|
||||
BLANK_CHOICE_DASH: List[Tuple[str, str]] = ...
|
||||
|
||||
class FieldFile(File):
|
||||
instance: Model = ...
|
||||
field: FileField = ...
|
||||
|
||||
Reference in New Issue
Block a user