add missing files throughout the codebase (#102)

This commit is contained in:
Maxim Kurnikov
2019-07-09 05:18:15 +03:00
committed by GitHub
parent d8230a4147
commit 2799646723
67 changed files with 748 additions and 120 deletions
+9 -3
View File
@@ -1,12 +1,16 @@
from datetime import datetime, timedelta
from decimal import Decimal
from typing import Any, Callable, List, Optional, Pattern, Sequence, Type, Union
from typing import Any, Callable, List, Optional, Pattern, Sequence, Type, Union, Tuple, Iterable
from django.core.validators import BaseValidator
from django.forms.boundfield import BoundField
from django.forms.forms import BaseForm
from django.forms.widgets import Widget
_Choice = Tuple[Any, str]
_ChoiceNamedGroup = Tuple[str, Iterable[_Choice]]
_FieldChoices = Iterable[Union[_Choice, _ChoiceNamedGroup]]
class Field:
initial: Any
label: Optional[str]
@@ -23,6 +27,9 @@ class Field:
localize: bool = ...
error_messages: Any = ...
validators: List[BaseValidator] = ...
max_length: Optional[Union[int, str]] = ...
choices: _FieldChoices = ...
base_field: Field
def __init__(
self,
*,
@@ -47,9 +54,9 @@ class Field:
def widget_attrs(self, widget: Widget) -> Any: ...
def has_changed(self, initial: Any, data: Any) -> bool: ...
def get_bound_field(self, form: BaseForm, field_name: str) -> BoundField: ...
def deconstruct(self) -> Any: ...
class CharField(Field):
max_length: Optional[Union[int, str]] = ...
min_length: Optional[Union[int, str]] = ...
strip: bool = ...
empty_value: Optional[str] = ...
@@ -171,7 +178,6 @@ class RegexField(CharField):
class EmailField(CharField): ...
class FileField(Field):
max_length: Optional[int] = ...
allow_empty_file: bool = ...
def __init__(
self,
-3
View File
@@ -1,9 +1,6 @@
from datetime import datetime
from typing import Any, Dict, Iterator, List, Mapping, Optional, Sequence, Type, Union
from django.core.exceptions import ValidationError as ValidationError
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.models.query import QuerySet
from django.forms.boundfield import BoundField
from django.forms.fields import Field
from django.forms.renderers import BaseRenderer