mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 08:17:08 +08:00
reformat with black
This commit is contained in:
@@ -8,7 +8,10 @@ from typing import Any, Optional
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.sql.where import WhereNode
|
||||
from typing import Set, Tuple, Type, Union
|
||||
JoinInfo = namedtuple('JoinInfo', ['final_field', 'targets', 'opts', 'joins', 'path', 'transform_function'])
|
||||
|
||||
JoinInfo = namedtuple(
|
||||
"JoinInfo", ["final_field", "targets", "opts", "joins", "path", "transform_function"]
|
||||
)
|
||||
|
||||
class RawQuery:
|
||||
params: Any = ...
|
||||
@@ -98,7 +101,9 @@ class Query:
|
||||
def explain(self, using: Any, format: Optional[Any] = ..., **options: Any): ...
|
||||
def combine(self, rhs: Any, connector: Any) -> None: ...
|
||||
def deferred_to_data(self, target: Any, callback: Any): ...
|
||||
def table_alias(self, table_name: Any, create: bool = ..., filtered_relation: Optional[Any] = ...): ...
|
||||
def table_alias(
|
||||
self, table_name: Any, create: bool = ..., filtered_relation: Optional[Any] = ...
|
||||
): ...
|
||||
def ref_alias(self, alias: Any) -> None: ...
|
||||
def unref_alias(self, alias: Any, amount: int = ...) -> None: ...
|
||||
def promote_joins(self, aliases: Any) -> None: ...
|
||||
@@ -108,9 +113,16 @@ class Query:
|
||||
def bump_prefix(self, outer_query: Any): ...
|
||||
def get_initial_alias(self): ...
|
||||
def count_active_tables(self): ...
|
||||
def join(self, join: Any, reuse: Optional[Any] = ..., reuse_with_filtered_relation: bool = ...): ...
|
||||
def join(
|
||||
self,
|
||||
join: Any,
|
||||
reuse: Optional[Any] = ...,
|
||||
reuse_with_filtered_relation: bool = ...,
|
||||
): ...
|
||||
def join_parent_model(self, opts: Any, model: Any, alias: Any, seen: Any): ...
|
||||
def add_annotation(self, annotation: Any, alias: Any, is_summary: bool = ...) -> None: ...
|
||||
def add_annotation(
|
||||
self, annotation: Any, alias: Any, is_summary: bool = ...
|
||||
) -> None: ...
|
||||
def resolve_expression(self, query: Any, *args: Any, **kwargs: Any): ...
|
||||
def as_sql(self, compiler: Any, connection: Any): ...
|
||||
def resolve_lookup_value(self, value: Any, can_reuse: Any, allow_joins: Any): ...
|
||||
@@ -120,16 +132,55 @@ class Query:
|
||||
def build_lookup(self, lookups: Any, lhs: Any, rhs: Any): ...
|
||||
def try_transform(self, lhs: Any, name: Any): ...
|
||||
_lookup_joins: Any = ...
|
||||
def build_filter(self, filter_expr: Any, branch_negated: bool = ..., current_negated: bool = ..., can_reuse: Optional[Any] = ..., allow_joins: bool = ..., split_subq: bool = ..., reuse_with_filtered_relation: bool = ...): ...
|
||||
def build_filter(
|
||||
self,
|
||||
filter_expr: Any,
|
||||
branch_negated: bool = ...,
|
||||
current_negated: bool = ...,
|
||||
can_reuse: Optional[Any] = ...,
|
||||
allow_joins: bool = ...,
|
||||
split_subq: bool = ...,
|
||||
reuse_with_filtered_relation: bool = ...,
|
||||
): ...
|
||||
def add_filter(self, filter_clause: Any) -> None: ...
|
||||
def add_q(self, q_object: Any) -> None: ...
|
||||
def _add_q(self, q_object: Any, used_aliases: Any, branch_negated: bool = ..., current_negated: bool = ..., allow_joins: bool = ..., split_subq: bool = ...): ...
|
||||
def build_filtered_relation_q(self, q_object: Any, reuse: Any, branch_negated: bool = ..., current_negated: bool = ...): ...
|
||||
def _add_q(
|
||||
self,
|
||||
q_object: Any,
|
||||
used_aliases: Any,
|
||||
branch_negated: bool = ...,
|
||||
current_negated: bool = ...,
|
||||
allow_joins: bool = ...,
|
||||
split_subq: bool = ...,
|
||||
): ...
|
||||
def build_filtered_relation_q(
|
||||
self,
|
||||
q_object: Any,
|
||||
reuse: Any,
|
||||
branch_negated: bool = ...,
|
||||
current_negated: bool = ...,
|
||||
): ...
|
||||
def add_filtered_relation(self, filtered_relation: Any, alias: Any) -> None: ...
|
||||
def names_to_path(self, names: Any, opts: Any, allow_many: bool = ..., fail_on_missing: bool = ...): ...
|
||||
def setup_joins(self, names: Any, opts: Any, alias: Any, can_reuse: Optional[Any] = ..., allow_many: bool = ..., reuse_with_filtered_relation: bool = ...): ...
|
||||
def names_to_path(
|
||||
self, names: Any, opts: Any, allow_many: bool = ..., fail_on_missing: bool = ...
|
||||
): ...
|
||||
def setup_joins(
|
||||
self,
|
||||
names: Any,
|
||||
opts: Any,
|
||||
alias: Any,
|
||||
can_reuse: Optional[Any] = ...,
|
||||
allow_many: bool = ...,
|
||||
reuse_with_filtered_relation: bool = ...,
|
||||
): ...
|
||||
def trim_joins(self, targets: Any, joins: Any, path: Any): ...
|
||||
def resolve_ref(self, name: Any, allow_joins: bool = ..., reuse: Optional[Any] = ..., summarize: bool = ...): ...
|
||||
def resolve_ref(
|
||||
self,
|
||||
name: Any,
|
||||
allow_joins: bool = ...,
|
||||
reuse: Optional[Any] = ...,
|
||||
summarize: bool = ...,
|
||||
): ...
|
||||
def split_exclude(self, filter_expr: Any, can_reuse: Any, names_with_path: Any): ...
|
||||
def set_empty(self) -> None: ...
|
||||
def is_empty(self): ...
|
||||
@@ -148,7 +199,15 @@ class Query:
|
||||
def clear_ordering(self, force_empty: Any) -> None: ...
|
||||
def set_group_by(self) -> None: ...
|
||||
def add_select_related(self, fields: Any) -> None: ...
|
||||
def add_extra(self, select: Any, select_params: Any, where: Any, params: Any, tables: Any, order_by: Any) -> None: ...
|
||||
def add_extra(
|
||||
self,
|
||||
select: Any,
|
||||
select_params: Any,
|
||||
where: Any,
|
||||
params: Any,
|
||||
tables: Any,
|
||||
order_by: Any,
|
||||
) -> None: ...
|
||||
def clear_deferred_loading(self) -> None: ...
|
||||
def add_deferred_loading(self, field_names: Any) -> None: ...
|
||||
def add_immediate_loading(self, field_names: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user