mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -8,7 +8,6 @@ from django.db.models.sql.query import Query
|
||||
from django.db.models.sql.where import WhereNode
|
||||
from django.utils.datastructures import ImmutableList
|
||||
|
||||
|
||||
class DeleteQuery(Query):
|
||||
alias_refcount: Dict[str, int]
|
||||
annotation_select_mask: None
|
||||
@@ -49,15 +48,10 @@ class DeleteQuery(Query):
|
||||
values_select: Tuple
|
||||
where_class: Type[django.db.models.sql.where.WhereNode]
|
||||
compiler: str = ...
|
||||
alias_map: Union[
|
||||
Dict[str, django.db.models.sql.datastructures.BaseTable],
|
||||
collections.OrderedDict,
|
||||
] = ...
|
||||
alias_map: Union[Dict[str, django.db.models.sql.datastructures.BaseTable], collections.OrderedDict] = ...
|
||||
where: django.db.models.sql.where.WhereNode = ...
|
||||
def do_query(self, table: str, where: WhereNode, using: str) -> int: ...
|
||||
def delete_batch(
|
||||
self, pk_list: Union[List[int], List[str]], using: str
|
||||
) -> int: ...
|
||||
def delete_batch(self, pk_list: Union[List[int], List[str]], using: str) -> int: ...
|
||||
def delete_qs(self, query: QuerySet, using: str) -> int: ...
|
||||
|
||||
class UpdateQuery(Query):
|
||||
@@ -88,10 +82,7 @@ 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
|
||||
@@ -116,16 +107,10 @@ class UpdateQuery(Query):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def clone(self) -> UpdateQuery: ...
|
||||
where: django.db.models.sql.where.WhereNode = ...
|
||||
def update_batch(
|
||||
self, pk_list: List[int], values: Dict[str, Optional[int]], using: str
|
||||
) -> None: ...
|
||||
def update_batch(self, pk_list: List[int], values: Dict[str, Optional[int]], using: str) -> None: ...
|
||||
def add_update_values(self, values: Dict[str, Any]) -> None: ...
|
||||
def add_update_fields(
|
||||
self, values_seq: List[Tuple[Field, Optional[Type[Model]], Case]]
|
||||
) -> None: ...
|
||||
def add_related_update(
|
||||
self, model: Type[Model], field: Field, value: Union[int, str]
|
||||
) -> None: ...
|
||||
def add_update_fields(self, values_seq: List[Tuple[Field, Optional[Type[Model]], Case]]) -> None: ...
|
||||
def add_related_update(self, model: Type[Model], field: Field, value: Union[int, str]) -> None: ...
|
||||
def get_related_updates(self) -> List[UpdateQuery]: ...
|
||||
|
||||
class InsertQuery(Query):
|
||||
@@ -177,10 +162,7 @@ class InsertQuery(Query):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
raw: bool = ...
|
||||
def insert_values(
|
||||
self,
|
||||
fields: Union[List[DateTimeCheckMixin], List[Field], ImmutableList],
|
||||
objs: List[Model],
|
||||
raw: bool = ...,
|
||||
self, fields: Union[List[DateTimeCheckMixin], List[Field], ImmutableList], objs: List[Model], raw: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
class AggregateQuery(Query):
|
||||
|
||||
Reference in New Issue
Block a user