black reformat, some fixes

This commit is contained in:
Maxim Kurnikov
2018-12-06 19:13:06 +03:00
parent 25a71a7ef5
commit 5ec2830ba6
108 changed files with 673 additions and 187 deletions

View File

@@ -87,7 +87,9 @@ class Field(RegisterLookupMixin):
error_messages: None = ...,
) -> None: ...
def check(self, **kwargs: Any) -> List[Any]: ...
def get_col(self, alias: str, output_field: Optional[Union[Field, reverse_related.ForeignObjectRel]] = ...) -> Col: ...
def get_col(
self, alias: str, output_field: Optional[Union[Field, reverse_related.ForeignObjectRel]] = ...
) -> Col: ...
def cached_col(self) -> Col: ...
def select_format(
self, compiler: SQLCompiler, sql: str, params: List[Union[int, str]]
@@ -162,7 +164,9 @@ class AutoField(Field):
def to_python(self, value: Union[int, str]) -> int: ...
def rel_db_type(self, connection: DatabaseWrapper) -> str: ...
def validate(self, value: Any, model_instance: Any) -> None: ...
def get_db_prep_value(self, value: Union[int, str], connection: DatabaseWrapper, prepared: bool = ...) -> Union[int, str]: ...
def get_db_prep_value(
self, value: Union[int, str], connection: DatabaseWrapper, prepared: bool = ...
) -> Union[int, str]: ...
def get_prep_value(self, value: Optional[Union[int, str]]) -> Optional[int]: ...
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs: Any) -> None: ...
def formfield(self, **kwargs: Any) -> None: ...
@@ -206,7 +210,12 @@ class DateField(DateTimeCheckMixin, Field):
default_error_messages: Any = ...
description: Any = ...
def __init__(
self, verbose_name: Optional[str] = ..., name: None = ..., auto_now: bool = ..., auto_now_add: bool = ..., **kwargs: Any
self,
verbose_name: Optional[str] = ...,
name: None = ...,
auto_now: bool = ...,
auto_now_add: bool = ...,
**kwargs: Any
) -> None: ...
def deconstruct(self) -> Tuple[Optional[str], str, List[Any], Dict[str, Union[Callable, int, str]]]: ...
def get_internal_type(self) -> str: ...
@@ -214,7 +223,9 @@ class DateField(DateTimeCheckMixin, Field):
def pre_save(self, model_instance: Model, add: bool) -> Optional[Union[date, CombinedExpression]]: ...
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs: Any) -> None: ...
def get_prep_value(self, value: Optional[Union[date, str]]) -> Optional[date]: ...
def get_db_prep_value(self, value: Optional[date], connection: DatabaseWrapper, prepared: bool = ...) -> Optional[str]: ...
def get_db_prep_value(
self, value: Optional[date], connection: DatabaseWrapper, prepared: bool = ...
) -> Optional[str]: ...
def value_to_string(self, obj: Model) -> str: ...
def formfield(self, **kwargs: Any) -> Field: ...
@@ -343,7 +354,9 @@ class GenericIPAddressField(Field):
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Union[Callable, int, str]) -> str: ...
def get_db_prep_value(self, value: Optional[str], connection: DatabaseWrapper, prepared: bool = ...) -> Optional[str]: ...
def get_db_prep_value(
self, value: Optional[str], connection: DatabaseWrapper, prepared: bool = ...
) -> Optional[str]: ...
def get_prep_value(self, value: Optional[str]) -> Optional[str]: ...
class NullBooleanField(BooleanField):

View File

@@ -84,7 +84,9 @@ class ImageField(FileField):
**kwargs: Any
) -> None: ...
def check(self, **kwargs: Any) -> List[Any]: ...
def deconstruct(self) -> Tuple[Optional[str], str, List[Any], Dict[str, Union[Callable, bool, FileSystemStorage, str]]]: ...
def deconstruct(
self
) -> Tuple[Optional[str], str, List[Any], Dict[str, Union[Callable, bool, FileSystemStorage, str]]]: ...
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs: Any) -> None: ...
def update_dimension_fields(self, instance: Model, force: bool = ..., *args: Any, **kwargs: Any) -> None: ...
def formfield(self, **kwargs: Any) -> ImageField: ...

View File

@@ -7,7 +7,16 @@ from django.db.models.base import Model
from django.db.models.expressions import Col
from django.db.models.fields import Field
from django.db.models.fields.related import ForeignObject
from django.db.models.lookups import BuiltinLookup, Exact, GreaterThan, GreaterThanOrEqual, In, IsNull, LessThan, LessThanOrEqual
from django.db.models.lookups import (
BuiltinLookup,
Exact,
GreaterThan,
GreaterThanOrEqual,
In,
IsNull,
LessThan,
LessThanOrEqual,
)
from django.db.models.sql.compiler import SQLCompiler
from django.db.models.sql.query import Query

View File

@@ -56,7 +56,9 @@ class ForeignObjectRel(FieldCacheMixin):
def get_internal_type(self) -> str: ...
@property
def db_type(self) -> Callable: ...
def get_choices(self, include_blank: bool = ..., blank_choice: List[Tuple[str, str]] = ...) -> List[Tuple[int, str]]: ...
def get_choices(
self, include_blank: bool = ..., blank_choice: List[Tuple[str, str]] = ...
) -> List[Tuple[int, str]]: ...
def is_hidden(self) -> bool: ...
def get_joining_columns(self) -> Tuple: ...
def get_extra_restriction(