mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 22:11:54 +08:00
black reformat, some fixes
This commit is contained in:
@@ -41,7 +41,9 @@ class SQLCompiler:
|
||||
select: List[Tuple[Union[BaseExpression, SQLiteNumericMixin], Tuple[str, List[float]], Optional[str]]],
|
||||
order_by: List[Tuple[OrderBy, Tuple[str, List[Union[int, str]], bool]]],
|
||||
) -> List[Tuple[str, List[float]]]: ...
|
||||
def collapse_group_by(self, expressions: List[Expression], having: Union[List[Expression], Tuple]) -> List[Expression]: ...
|
||||
def collapse_group_by(
|
||||
self, expressions: List[Expression], having: Union[List[Expression], Tuple]
|
||||
) -> List[Expression]: ...
|
||||
def get_select(
|
||||
self
|
||||
) -> Tuple[
|
||||
@@ -56,7 +58,9 @@ class SQLCompiler:
|
||||
select: List[Tuple[Union[Expression, SQLiteNumericMixin], Tuple[str, List[float]], Optional[str]]],
|
||||
) -> List[Tuple[OrderBy, Tuple[str, List[Any]], None]]: ...
|
||||
def quote_name_unless_alias(self, name: str) -> str: ...
|
||||
def compile(self, node: Any, select_format: Any = ...) -> Tuple[str, Union[List[Optional[int]], Tuple[int, int]]]: ...
|
||||
def compile(
|
||||
self, node: Any, select_format: Any = ...
|
||||
) -> Tuple[str, Union[List[Optional[int]], Tuple[int, int]]]: ...
|
||||
def get_combinator_sql(self, combinator: str, all: bool) -> Tuple[List[str], Union[List[int], List[str]]]: ...
|
||||
def as_sql(self, with_limits: bool = ..., with_col_aliases: bool = ...) -> Any: ...
|
||||
def get_default_columns(
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -82,7 +82,9 @@ class UpdateQuery(Query):
|
||||
model: Type[django.db.models.base.Model]
|
||||
order_by: Tuple
|
||||
related_ids: Optional[List[int]]
|
||||
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]]]
|
||||
]
|
||||
select: Tuple
|
||||
select_for_update: bool
|
||||
select_for_update_nowait: bool
|
||||
|
||||
@@ -39,7 +39,9 @@ class WhereNode(tree.Node):
|
||||
|
||||
class NothingNode:
|
||||
contains_aggregate: bool = ...
|
||||
def as_sql(self, compiler: SQLCompiler = ..., connection: Union[DefaultConnectionProxy, DatabaseWrapper] = ...) -> Any: ...
|
||||
def as_sql(
|
||||
self, compiler: SQLCompiler = ..., connection: Union[DefaultConnectionProxy, DatabaseWrapper] = ...
|
||||
) -> Any: ...
|
||||
|
||||
class ExtraWhere:
|
||||
contains_aggregate: bool = ...
|
||||
|
||||
Reference in New Issue
Block a user