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

@@ -46,9 +46,13 @@ class RawQuery:
class Query:
base_table: str
related_ids: None
related_updates: Dict[Type[django.db.models.base.Model], List[Tuple[django.db.models.fields.Field, None, Union[int, str]]]]
related_updates: Dict[
Type[django.db.models.base.Model], List[Tuple[django.db.models.fields.Field, None, Union[int, str]]]
]
values: List[
Tuple[django.db.models.fields.Field, Optional[Type[django.db.models.base.Model]], django.db.models.aggregates.Max]
Tuple[
django.db.models.fields.Field, Optional[Type[django.db.models.base.Model]], django.db.models.aggregates.Max
]
]
alias_prefix: str = ...
subq_aliases: frozenset = ...
@@ -75,7 +79,9 @@ class Query:
select_for_update_nowait: bool = ...
select_for_update_skip_locked: bool = ...
select_for_update_of: Tuple = ...
select_related: Union[Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, Dict[Any, Any]]]]]]]], bool] = ...
select_related: Union[
Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, Dict[Any, Any]]]]]]]], bool
] = ...
max_depth: int = ...
values_select: Tuple = ...
annotation_select_mask: Optional[Set[str]] = ...
@@ -103,7 +109,10 @@ class Query:
memo: Dict[
int,
Union[
Dict[str, Union[ModelState, int, str]], List[Union[Dict[str, Union[bool, str]], ModelState]], Model, ModelState
Dict[str, Union[ModelState, int, str]],
List[Union[Dict[str, Union[bool, str]], ModelState]],
Model,
ModelState,
],
],
) -> Query: ...
@@ -146,10 +155,18 @@ class Query:
def resolve_expression(self, query: Query, *args: Any, **kwargs: Any) -> Query: ...
def as_sql(self, compiler: SQLCompiler, connection: DatabaseWrapper) -> Tuple[str, Tuple]: ...
def resolve_lookup_value(self, value: Any, can_reuse: Optional[Set[str]], allow_joins: bool) -> Any: ...
def solve_lookup_type(self, lookup: str) -> Union[Tuple[List[str], List[str], bool], Tuple[List[str], Tuple, Expression]]: ...
def check_query_object_type(self, value: Union[Model, int, str, UUID], opts: Options, field: FieldCacheMixin) -> None: ...
def check_related_objects(self, field: Union[Field, reverse_related.ForeignObjectRel], value: Any, opts: Options) -> None: ...
def build_lookup(self, lookups: List[str], lhs: Union[Expression, TextField, MultiColSource], rhs: Any) -> Lookup: ...
def solve_lookup_type(
self, lookup: str
) -> Union[Tuple[List[str], List[str], bool], Tuple[List[str], Tuple, Expression]]: ...
def check_query_object_type(
self, value: Union[Model, int, str, UUID], opts: Options, field: FieldCacheMixin
) -> None: ...
def check_related_objects(
self, field: Union[Field, reverse_related.ForeignObjectRel], value: Any, opts: Options
) -> None: ...
def build_lookup(
self, lookups: List[str], lhs: Union[Expression, TextField, MultiColSource], rhs: Any
) -> Lookup: ...
def try_transform(self, lhs: Expression, name: str) -> Transform: ...
def build_filter(
self,