fifth iteration

This commit is contained in:
Maxim Kurnikov
2018-08-14 12:01:01 +03:00
parent 8cc446150c
commit a13d4c352a
124 changed files with 1455 additions and 5681 deletions
+32 -60
View File
@@ -9,7 +9,7 @@ from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.models.fields.files import FieldFile
from django.forms.boundfield import BoundField
from django.forms.forms import BaseForm
from django.forms.widgets import Input, Select, Widget
from django.forms.widgets import Input, Widget
class Field:
@@ -44,37 +44,33 @@ class Field:
label_suffix: Optional[Any] = ...
) -> None: ...
def prepare_value(self, value: Any) -> Any: ...
def to_python(self, value: Any) -> Any: ...
def to_python(
self,
value: Optional[Union[List[None], List[str], datetime, float, str]],
) -> Optional[Union[List[None], List[str], datetime, float, str]]: ...
def validate(self, value: Any) -> None: ...
def run_validators(self, value: Any) -> None: ...
def clean(self, value: Any) -> Any: ...
def bound_data(self, data: Any, initial: Any) -> Any: ...
def widget_attrs(self, widget: Widget) -> Dict[Any, Any]: ...
def has_changed(self, initial: Any, data: Optional[str]) -> bool: ...
def has_changed(
self,
initial: Optional[Union[datetime, Decimal, float, str]],
data: Optional[str],
) -> bool: ...
def get_bound_field(
self, form: BaseForm, field_name: str
) -> BoundField: ...
def __deepcopy__(
self,
memo: Union[
Dict[
int,
Union[
List[Tuple[str, str]],
List[Union[List[Tuple[str, str]], Field, Widget]],
OrderedDict,
Field,
Widget,
],
],
Dict[
int,
Union[
List[Union[List[Any], ChoiceField, Select]],
OrderedDict,
ChoiceField,
Select,
],
memo: Dict[
int,
Union[
List[Tuple[Union[int, str], str]],
List[Widget],
OrderedDict,
Field,
Widget,
],
],
) -> Field: ...
@@ -142,7 +138,7 @@ class IntegerField(Field):
) -> Optional[int]: ...
def widget_attrs(
self, widget: Widget
) -> Union[Dict[str, Decimal], Dict[str, float], Dict[str, int]]: ...
) -> Dict[str, Union[Decimal, float]]: ...
class FloatField(IntegerField):
disabled: bool
@@ -163,9 +159,7 @@ class FloatField(IntegerField):
self, value: Optional[Union[float, str]]
) -> Optional[float]: ...
def validate(self, value: Optional[float]) -> None: ...
def widget_attrs(
self, widget: Input
) -> Union[Dict[str, Union[float, str]], Dict[str, Union[int, str]]]: ...
def widget_attrs(self, widget: Input) -> Dict[str, Union[float, str]]: ...
class DecimalField(IntegerField):
decimal_places: Optional[int]
@@ -204,14 +198,14 @@ class DecimalField(IntegerField):
def validate(self, value: Optional[Decimal]) -> None: ...
def widget_attrs(
self, widget: Widget
) -> Union[Dict[str, Union[Decimal, str]], Dict[str, Union[int, str]]]: ...
) -> Dict[str, Union[Decimal, int, str]]: ...
class BaseTemporalField(Field):
input_formats: Any = ...
def __init__(
self, *, input_formats: Optional[Any] = ..., **kwargs: Any
) -> None: ...
def to_python(self, value: str) -> Union[date, time]: ...
def to_python(self, value: str) -> datetime: ...
def strptime(self, value: Any, format: Any) -> None: ...
class DateField(BaseTemporalField):
@@ -479,8 +473,8 @@ class ChoiceField(Field):
memo: Dict[
int,
Union[
List[Tuple[str, str]],
List[Union[List[Tuple[str, str]], Field, Widget]],
List[Tuple[Union[int, str], str]],
List[Widget],
OrderedDict,
Field,
Widget,
@@ -500,7 +494,7 @@ class TypedChoiceField(ChoiceField):
localize: bool
required: bool
show_hidden_initial: bool
coerce: Union[Callable, Type[Union[float, int, str]]] = ...
coerce: Union[Callable, Type[Union[bool, float, str]]] = ...
empty_value: Optional[str] = ...
def __init__(
self, *, coerce: Any = ..., empty_value: str = ..., **kwargs: Any
@@ -542,12 +536,12 @@ class TypedMultipleChoiceField(MultipleChoiceField):
localize: bool
required: bool
show_hidden_initial: bool
coerce: Union[Callable, Type[Union[float, int]]] = ...
coerce: Union[Callable, Type[float]] = ...
empty_value: Optional[List[Any]] = ...
def __init__(self, *, coerce: Any = ..., **kwargs: Any) -> None: ...
def clean(
self, value: List[str]
) -> Optional[Union[List[Decimal], List[float], List[int]]]: ...
) -> Optional[Union[List[bool], List[Decimal], List[float]]]: ...
def validate(self, value: List[str]) -> None: ...
class ComboField(Field):
@@ -584,41 +578,22 @@ class MultiValueField(Field):
) -> None: ...
def __deepcopy__(
self,
memo: Union[
Dict[
int,
Union[
List[Tuple[str, str]],
List[Union[List[Tuple[str, str]], Widget]],
OrderedDict,
Field,
Widget,
],
],
Dict[
int,
Union[List[Union[Field, Widget]], OrderedDict, Field, Widget],
],
memo: Dict[
int, Union[List[Tuple[str, str]], OrderedDict, Field, Widget]
],
) -> MultiValueField: ...
def validate(self, value: Union[datetime, str]) -> None: ...
def clean(
self,
value: Optional[
Union[
List[None],
List[Union[List[str], str]],
List[Union[date, time]],
datetime,
str,
]
Union[List[None], List[datetime], List[str], datetime, str]
],
) -> Optional[Union[datetime, str]]: ...
def compress(self, data_list: Any) -> None: ...
def has_changed(
self,
initial: Optional[Union[List[None], List[str], datetime, str]],
data: Union[List[None], List[Union[List[str], str]]],
data: Union[List[None], List[str]],
) -> bool: ...
class FilePathField(ChoiceField):
@@ -669,10 +644,7 @@ class SplitDateTimeField(MultiValueField):
**kwargs: Any
) -> None: ...
def compress(
self,
data_list: Union[
List[Optional[date]], List[Optional[time]], List[Union[date, time]]
],
self, data_list: List[Optional[datetime]]
) -> Optional[datetime]: ...
class GenericIPAddressField(CharField):
+12 -22
View File
@@ -1,18 +1,16 @@
from collections import OrderedDict
from datetime import date, datetime, time
from decimal import Decimal
from datetime import date, datetime
from typing import Any, Dict, Iterator, List, Optional, Tuple, Type, Union
from django.core.exceptions import ValidationError
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.models.base import Model
from django.db.models.fields.files import FieldFile
from django.db.models.query import QuerySet
from django.forms.boundfield import BoundField
from django.forms.fields import Field
from django.forms.models import ModelForm
from django.forms.utils import ErrorDict, ErrorList
from django.forms.widgets import Media, MediaDefiningClass
from django.http.request import QueryDict
from django.utils.datastructures import MultiValueDict
from django.utils.safestring import SafeText
@@ -22,7 +20,7 @@ class DeclarativeFieldsMetaclass(MediaDefiningClass):
name: str,
bases: Tuple[Type[BaseForm]],
attrs: OrderedDict,
) -> Type[Union[Form, ModelForm]]: ...
) -> Type[BaseForm]: ...
@classmethod
def __prepare__(
metacls: Any, name: str, bases: Tuple[Type[BaseForm]], **kwds: Any
@@ -47,22 +45,18 @@ class BaseForm:
self,
data: Optional[
Union[
Dict[str, Optional[Union[List[int], datetime, int, str]]],
Dict[str, Union[List[int], int, str]],
Dict[str, Union[List[str], str]],
Dict[str, Union[datetime, Decimal, int, str]],
QueryDict,
]
] = ...,
files: Optional[Dict[str, SimpleUploadedFile]] = ...,
files: Optional[
Union[Dict[str, SimpleUploadedFile], MultiValueDict]
] = ...,
auto_id: Optional[Union[bool, str]] = ...,
prefix: Optional[str] = ...,
initial: Optional[
Union[
Dict[str, List[int]],
Dict[str, Optional[Union[List[Model], date, int, str]]],
Dict[str, Union[List[Model], Model, QuerySet]],
Dict[str, Union[List[str], str]],
Dict[str, Union[FieldFile, int, str]],
]
Union[Dict[str, List[int]], Dict[str, date], Dict[str, str]]
] = ...,
error_class: Type[ErrorList] = ...,
label_suffix: None = ...,
@@ -91,12 +85,8 @@ class BaseForm:
def full_clean(self) -> None: ...
def clean(
self
) -> Union[
Dict[str, Optional[Union[int, str]]],
Dict[str, Union[date, time, Decimal, float]],
Dict[str, Union[date, str]],
Dict[str, SimpleUploadedFile],
Dict[str, QuerySet],
) -> Dict[
str, Optional[Union[datetime, SimpleUploadedFile, QuerySet, str]]
]: ...
def has_changed(self) -> bool: ...
def changed_data(self) -> List[str]: ...
+3 -1
View File
@@ -6,7 +6,9 @@ from django.forms import Form
class ManagementForm(Form):
auto_id: Union[bool, str]
cleaned_data: Dict[str, Optional[int]]
data: Dict[str, Union[List[int], int, str]]
data: Union[
Dict[str, Union[List[int], int, str]], django.http.request.QueryDict
]
empty_permitted: bool
error_class: Type[django.forms.utils.ErrorList]
fields: collections.OrderedDict
+19 -108
View File
@@ -8,10 +8,8 @@ from uuid import UUID
from django.contrib.auth.forms import UserChangeForm, UserCreationForm
from django.contrib.flatpages.forms import FlatpageForm
from django.core.files.base import File
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.models.base import Model
from django.db.models.fields.files import FieldFile
from django.db.models.manager import Manager
from django.db.models.query import QuerySet
from django.db.models.query_utils import Q
@@ -19,7 +17,9 @@ from django.forms.fields import CharField, ChoiceField, Field
from django.forms.forms import BaseForm, DeclarativeFieldsMetaclass
from django.forms.formsets import BaseFormSet
from django.forms.utils import ErrorList
from django.forms.widgets import Widget
from django.forms.widgets import Input, Widget
from django.http.request import QueryDict
from django.utils.datastructures import MultiValueDict
ALL_FIELDS: str
@@ -27,17 +27,12 @@ def model_to_dict(
instance: Model,
fields: Optional[Union[List[Union[Callable, str]], Tuple[str]]] = ...,
exclude: Optional[Union[List[Union[Callable, str]], Tuple[str]]] = ...,
) -> Union[
Dict[str, Optional[Union[List[Model], date, int, str]]],
Dict[str, Optional[FieldFile]],
Dict[str, Union[FieldFile, int, str]],
Dict[str, float],
]: ...
) -> Dict[str, Optional[Union[bool, date, float]]]: ...
def fields_for_model(
model: Type[Model],
fields: Optional[Union[List[Union[Callable, str]], Tuple]] = ...,
exclude: Optional[Union[List[Union[Callable, str]], Tuple]] = ...,
widgets: Optional[Dict[str, Union[Type[Widget], Widget]]] = ...,
widgets: Optional[Union[Dict[str, Type[Input]], Dict[str, Widget]]] = ...,
formfield_callback: Optional[Union[Callable, str]] = ...,
localized_fields: Optional[Union[Tuple[str], str]] = ...,
labels: Optional[Dict[str, str]] = ...,
@@ -53,11 +48,9 @@ class ModelFormOptions:
fields: Optional[Union[List[Union[Callable, str]], Tuple, str]] = ...
exclude: Optional[Union[List[Union[Callable, str]], Tuple, str]] = ...
widgets: Optional[
Dict[
str,
Union[
Type[django.forms.widgets.Widget], django.forms.widgets.Widget
],
Union[
Dict[str, Type[django.forms.widgets.Input]],
Dict[str, django.forms.widgets.Widget],
]
] = ...
localized_fields: Optional[Union[Tuple[str], str]] = ...
@@ -97,19 +90,15 @@ class BaseModelForm(BaseForm):
Dict[str, Optional[Union[List[int], datetime, int, str]]],
Dict[str, Union[List[str], str]],
Dict[str, Union[datetime, Decimal, int, str]],
QueryDict,
]
] = ...,
files: Optional[Dict[str, SimpleUploadedFile]] = ...,
files: Optional[
Union[Dict[str, SimpleUploadedFile], MultiValueDict]
] = ...,
auto_id: Union[bool, str] = ...,
prefix: None = ...,
initial: Optional[
Union[
Dict[str, List[int]],
Dict[str, Union[List[Model], Model, QuerySet]],
Dict[str, Union[List[str], str]],
Dict[str, int],
]
] = ...,
initial: Optional[Union[Dict[str, List[int]], Dict[str, int]]] = ...,
error_class: Type[ErrorList] = ...,
label_suffix: None = ...,
empty_permitted: bool = ...,
@@ -117,15 +106,7 @@ class BaseModelForm(BaseForm):
use_required_attribute: None = ...,
renderer: Any = ...,
) -> None: ...
def clean(
self
) -> Union[
Dict[str, Optional[Union[bool, datetime, QuerySet, str]]],
Dict[str, Optional[Union[date, Model, QuerySet, str]]],
Dict[str, Optional[Union[Model, int, str]]],
Dict[str, Union[datetime, Decimal, int, str]],
Dict[str, Union[File, str]],
]: ...
def clean(self) -> Dict[str, Any]: ...
def validate_unique(self) -> None: ...
save_m2m: Any = ...
def save(self, commit: bool = ...) -> Model: ...
@@ -282,7 +263,7 @@ class ModelChoiceIterator:
field: django.forms.models.ModelChoiceField = ...
queryset: Optional[django.db.models.query.QuerySet] = ...
def __init__(self, field: ModelChoiceField) -> None: ...
def __iter__(self) -> Iterator[Tuple[str, str]]: ...
def __iter__(self) -> Iterator[Tuple[Union[int, str], str]]: ...
def __len__(self) -> int: ...
def __bool__(self) -> bool: ...
def choice(self, obj: Model) -> Tuple[int, str]: ...
@@ -321,9 +302,7 @@ class ModelChoiceField(ChoiceField):
) -> None: ...
def get_limit_choices_to(
self
) -> Optional[
Union[Dict[str, Union[int, str]], Dict[str, datetime], Q, MagicMock]
]: ...
) -> Optional[Union[Dict[str, datetime], Q, MagicMock]]: ...
def __deepcopy__(
self,
memo: Dict[
@@ -359,87 +338,19 @@ class ModelMultipleChoiceField(ModelChoiceField):
default_error_messages: Any = ...
def __init__(self, queryset: QuerySet, **kwargs: Any) -> None: ...
def to_python(
self,
value: Union[
List[str],
Tuple[
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
int,
],
],
self, value: Union[List[str], Tuple[int, ...]]
) -> List[Model]: ...
def clean(
self,
value: Optional[
Union[
List[Dict[str, str]],
List[List[str]],
List[Union[int, str]],
List[Model],
Tuple,
str,
List[Dict[str, str]], List[List[str]], List[Model], Tuple, str
]
],
) -> QuerySet: ...
def prepare_value(
self, value: Any
) -> Optional[
Union[
List[Dict[str, str]],
List[List[str]],
List[Union[int, str]],
int,
str,
]
]: ...
) -> Optional[Union[List[Dict[str, str]], List[List[str]], int, str]]: ...
def has_changed(
self,
initial: Optional[Union[List[Model], QuerySet, str]],
+47 -674
View File
@@ -1,6 +1,5 @@
from datetime import time
from decimal import Decimal
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from typing import Any, Dict, List, Optional, Tuple, Union
from django.template.backends.base import BaseEngine
from django.template.backends.django import Template
@@ -15,68 +14,18 @@ class BaseRenderer:
def render(
self,
template_name: str,
context: Union[
Dict[
str,
context: Dict[
str,
Union[
Dict[
str,
Optional[
Union[
Dict[str, Union[bool, float, str]],
Dict[str, bool],
List[
Union[
Dict[
str,
Optional[
Union[
Dict[str, Union[bool, str]],
List[
Dict[
str,
Optional[
Union[
Dict[
str,
Union[
bool,
str,
],
],
bool,
str,
]
],
]
],
bool,
str,
]
],
],
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Tuple[
None,
List[
Dict[
str,
Union[
Dict[Any, Any],
bool,
str,
],
]
],
int,
]
],
bool,
str,
],
],
Dict[
str,
Optional[Union[Dict[str, str], bool, str]],
]
],
bool,
@@ -84,153 +33,55 @@ class BaseRenderer:
]
],
],
],
Dict[
str,
Dict[
str,
Optional[
Union[
Dict[str, Union[Decimal, int, str]],
List[
Dict[
str,
Optional[Union[Dict[str, str], bool, str]],
]
],
int,
str,
]
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[Any, Any],
List[
Tuple[
List[
Dict[str, Union[Dict[Any, Any], bool, str]]
],
int,
int,
]
],
List[str],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[Any, Any],
List[
Union[
Dict[
str,
Union[
Dict[Any, Any],
List[
Dict[
str,
Union[
Dict[Any, Any], bool, str
],
]
],
bool,
str,
],
],
Dict[
str,
Union[
Dict[str, bool],
List[
Tuple[
None,
List[
Dict[
str,
Union[
Dict[str, bool],
bool,
str,
],
]
],
int,
]
],
List[str],
bool,
str,
],
],
]
],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[Any, Any],
List[
Union[
Tuple[
None,
List[
Dict[
str,
Union[Dict[Any, Any], bool, str],
]
],
int,
],
Tuple[
str,
List[
Dict[
str,
Union[Dict[str, bool], bool, str],
]
],
int,
],
]
],
List[str],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Tuple[
None,
List[
Dict[
str,
Union[
Dict[str, bool],
bool,
str,
],
]
],
int,
]
],
List[str],
bool,
str,
],
]
],
List[str],
bool,
str,
],
],
Dict[
str,
Union[
Dict[str, Union[int, str]],
List[
Tuple[
None,
Optional[str],
List[
Dict[
str,
Union[
Dict[str, Union[bool, str]],
time,
int,
str,
],
@@ -240,178 +91,10 @@ class BaseRenderer:
]
],
List[str],
bool,
int,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Union[
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Dict[
str,
Union[
Dict[str, Union[bool, str]],
bool,
str,
],
]
],
bool,
str,
],
],
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Tuple[
None,
List[
Dict[
str,
Union[
Dict[str, bool],
bool,
str,
],
]
],
int,
]
],
List[str],
bool,
str,
],
],
]
],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Union[
Tuple[
None,
List[
Dict[
str,
Union[Dict[str, bool], bool, str],
]
],
int,
],
Tuple[
str,
List[
Dict[
str,
Union[Dict[Any, Any], bool, str],
]
],
int,
],
]
],
List[str],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, Union[int, str]],
List[
Tuple[
None,
List[
Dict[
str,
Union[Dict[Any, Any], time, int, str],
]
],
int,
]
],
List[str],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, Union[int, str]],
List[
Tuple[
None,
List[
Dict[
str,
Union[
Dict[str, bool], Set[str], int, str
],
]
],
int,
]
],
List[str],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, bool],
List[
Tuple[
List[
Dict[str, Union[Dict[str, bool], bool, str]]
],
int,
int,
]
],
List[str],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
@@ -423,316 +106,6 @@ class BaseRenderer:
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, str],
List[
Tuple[
None,
List[
Dict[str, Union[Dict[str, str], int, str]]
],
int,
]
],
bool,
str,
],
],
],
Dict[
str,
Dict[
str,
Union[
Dict[str, str],
List[
Union[
Tuple[
None,
List[
Dict[
str,
Union[Dict[str, str], bool, str],
]
],
int,
],
Tuple[
str,
List[
Dict[
str,
Union[
Dict[str, Union[bool, str]],
bool,
str,
],
]
],
int,
],
]
],
List[str],
bool,
str,
],
],
],
Dict[
str,
Union[
Dict[
str,
Optional[
Union[
Dict[Any, Any],
List[
Dict[
str,
Optional[
Union[Dict[Any, Any], bool, str]
],
]
],
bool,
str,
]
],
],
List[Dict[str, str]],
],
],
Dict[
str,
Union[
Dict[
str,
Optional[
Union[
Dict[str, Union[bool, str]],
List[
Dict[
str,
Optional[
Union[
Dict[str, Union[bool, str]],
bool,
str,
]
],
]
],
bool,
str,
]
],
],
str,
],
],
Dict[
str,
Union[
Dict[
str,
Optional[
Union[
Dict[str, str],
List[
Dict[
str,
Optional[
Union[Dict[str, str], bool, str]
],
]
],
bool,
str,
]
],
],
str,
],
],
Dict[
str,
Union[
Dict[str, Optional[Union[Dict[str, str], bool, str]]],
List[Dict[str, str]],
],
],
Dict[
str,
Union[
Dict[
str,
Union[
Dict[Any, Any],
List[
Dict[
str,
Union[
Dict[Any, Any],
List[
Tuple[
None,
List[
Dict[
str,
Union[
Dict[str, bool],
bool,
str,
],
]
],
int,
]
],
List[str],
bool,
str,
],
]
],
List[str],
bool,
str,
],
],
str,
],
],
Dict[
str,
Union[
Dict[
str,
Union[
Dict[Any, Any],
List[Dict[str, Union[Dict[str, str], bool, str]]],
bool,
str,
],
],
str,
],
],
Dict[
str,
Union[
Dict[
str,
Union[
Dict[str, Union[bool, str]],
List[
Dict[
str,
Union[
Dict[str, Union[bool, str]], bool, str
],
]
],
bool,
str,
],
],
str,
],
],
Dict[
str,
Union[
Dict[
str,
Union[
Dict[str, str],
List[Dict[str, Union[Dict[str, str], bool, str]]],
List[str],
bool,
str,
],
],
str,
],
],
Dict[
str,
Union[
Dict[
str,
Union[
Dict[str, str],
List[
Tuple[
None,
List[
Dict[
str,
Union[Dict[str, str], bool, str],
]
],
int,
]
],
bool,
str,
],
],
str,
],
],
Dict[
str,
Union[
Dict[
str,
Union[
Dict[str, str],
List[
Union[
Tuple[
List[
Dict[
str,
Union[
Dict[str, str], bool, str
],
]
],
int,
int,
],
Tuple[
str,
List[
Dict[
str,
Union[
Dict[str, Union[bool, str]],
bool,
str,
],
]
],
int,
],
]
],
List[str],
bool,
str,
],
],
List[Dict[str, str]],
],
],
Dict[str, Union[bool, str]],
],
request: None = ...,
) -> str: ...
+5 -5
View File
@@ -7,9 +7,7 @@ from django.utils.safestring import SafeText
def pretty_name(name: str) -> str: ...
def flatatt(
attrs: Union[Dict[str, None], Dict[str, Union[bool, str]]]
) -> SafeText: ...
def flatatt(attrs: Dict[str, Optional[str]]) -> SafeText: ...
class ErrorDict(dict):
def as_data(self) -> Dict[str, List[ValidationError]]: ...
@@ -25,7 +23,9 @@ class ErrorList(UserList, list):
error_class: str = ...
def __init__(
self,
initlist: Optional[Union[List[ValidationError], List[str]]] = ...,
initlist: Optional[
Union[List[ValidationError], List[str], ErrorList]
] = ...,
error_class: Optional[str] = ...,
) -> None: ...
def as_data(self) -> List[ValidationError]: ...
@@ -36,7 +36,7 @@ class ErrorList(UserList, list):
def as_ul(self) -> str: ...
def as_text(self) -> str: ...
def __contains__(self, item: str) -> bool: ...
def __eq__(self, other: List[str]) -> bool: ...
def __eq__(self, other: Union[List[str], ErrorList]) -> bool: ...
def __getitem__(self, i: Union[int, str]) -> str: ...
def __reduce_ex__(
self, *args: Any, **kwargs: Any
File diff suppressed because it is too large Load Diff