reformat with black

This commit is contained in:
Maxim Kurnikov
2018-07-29 23:34:58 +03:00
parent 4866354600
commit cf85607969
343 changed files with 6054 additions and 2158 deletions

View File

@@ -1,7 +1,4 @@
from django.core.checks.messages import (
Error,
Warning,
)
from django.core.checks.messages import Error, Warning
from django.db.backends.sqlite3.base import DatabaseWrapper
from django.db.models.base import Model
from django.db.models.expressions import Col
@@ -11,24 +8,11 @@ from django.db.models.fields.reverse_related import (
ManyToOneRel,
OneToOneRel,
)
from django.db.models.query_utils import (
FilteredRelation,
PathInfo,
)
from django.db.models.query_utils import FilteredRelation, PathInfo
from django.forms.models import ModelChoiceField
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Tuple,
Type,
Union,
)
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
from uuid import UUID
class ForeignKey:
def __init__(
self,
@@ -40,54 +24,45 @@ class ForeignKey:
parent_link: bool = ...,
to_field: Optional[str] = ...,
db_constraint: bool = ...,
**kwargs
**kwargs,
) -> None: ...
def _check_on_delete(self) -> List[Any]: ...
def _check_unique(self, **kwargs) -> List[Warning]: ...
def check(
self,
**kwargs
) -> Union[List[Warning], List[Error]]: ...
def check(self, **kwargs) -> Union[List[Warning], List[Error]]: ...
def contribute_to_related_class(
self,
cls: Type[Model],
related: ManyToOneRel
self, cls: Type[Model], related: ManyToOneRel
) -> None: ...
def db_check(self, connection: DatabaseWrapper) -> List[Any]: ...
def db_parameters(self, connection: DatabaseWrapper) -> Dict[str, str]: ...
def db_type(self, connection: DatabaseWrapper) -> str: ...
def deconstruct(self) -> Any: ...
def formfield(self, *, using = ..., **kwargs) -> ModelChoiceField: ...
def formfield(self, *, using=..., **kwargs) -> ModelChoiceField: ...
def get_attname(self) -> str: ...
def get_attname_column(self) -> Tuple[str, str]: ...
def get_col(
self,
alias: str,
output_field: Optional[Union[Field, reverse_related.OneToOneRel]] = ...
output_field: Optional[Union[Field, reverse_related.OneToOneRel]] = ...,
) -> Col: ...
def get_db_converters(self, connection: DatabaseWrapper) -> List[Any]: ...
def get_db_prep_save(
self,
value: object,
connection: DatabaseWrapper
self, value: object, connection: DatabaseWrapper
) -> Optional[Union[str, int]]: ...
def get_db_prep_value(
self,
value: Union[str, int, UUID],
connection: DatabaseWrapper,
prepared: bool = ...
prepared: bool = ...,
) -> Union[str, int]: ...
def get_default(self) -> Optional[int]: ...
def get_reverse_path_info(
self,
filtered_relation: Optional[FilteredRelation] = ...
self, filtered_relation: Optional[FilteredRelation] = ...
) -> List[PathInfo]: ...
@property
def target_field(self) -> Field: ...
def to_python(self, value: Union[str, int]) -> Union[str, int]: ...
def validate(self, value: int, model_instance: Optional[Model]) -> None: ...
class ForeignObject:
def __init__(
self,
@@ -101,8 +76,8 @@ class ForeignObject:
limit_choices_to: None = ...,
parent_link: bool = ...,
swappable: bool = ...,
**kwargs
**kwargs,
) -> None: ...
def _check_to_fields_exist(self) -> List[Error]: ...
def _check_unique_target(self) -> List[Error]: ...
def check(self, **kwargs) -> List[Error]: ...
def check(self, **kwargs) -> List[Error]: ...