add test_runner/lookup test folders

This commit is contained in:
Maxim Kurnikov
2019-02-05 16:41:28 +03:00
parent e4d2b795e3
commit dbc9b49867
6 changed files with 32 additions and 22 deletions

View File

@@ -1,17 +1,15 @@
import collections
from collections import OrderedDict, namedtuple
from datetime import datetime
from decimal import Decimal
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union
from uuid import UUID
from typing import Any, Callable, Dict, Iterator, List, Optional, Sequence, Set, Tuple, Type, Union
from django.db.models.sql.datastructures import BaseTable
from django.db.models import Model, Field, Q, FilteredRelation, Expression, QuerySet
from django.db.models.lookups import Lookup
from django.db.models.query_utils import PathInfo
from django.db.models.sql.compiler import SQLCompiler
from django.db.models.sql.datastructures import BaseTable
from django.db.models.sql.where import WhereNode
from django.db.models import Expression, Field, FilteredRelation, Model, Q, QuerySet
JoinInfo = namedtuple("JoinInfo", ["final_field", "targets", "opts", "joins", "path", "transform_function"])
class RawQuery:
@@ -55,9 +53,7 @@ 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, Any], bool] = ...
max_depth: int = ...
values_select: Tuple = ...
annotation_select_mask: Optional[Set[str]] = ...
@@ -178,6 +174,7 @@ class Query:
def set_values(self, fields: Union[List[str], Tuple]) -> None: ...
def trim_start(self, names_with_path: List[Tuple[str, List[PathInfo]]]) -> Tuple[str, bool]: ...
def is_nullable(self, field: Field) -> bool: ...
def build_lookup(self, lookups: Sequence[str], lhs: Query, rhs: Optional[Query]) -> Lookup: ...
class JoinPromoter:
connector: str = ...