mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 05:51:53 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -9,37 +9,24 @@ from django.db.models.sql.compiler import SQLCompiler
|
||||
from django.db.models.sql.query import Query
|
||||
from django.db.models.sql.where import WhereNode
|
||||
|
||||
|
||||
class Aggregate(Func):
|
||||
contains_aggregate: bool = ...
|
||||
name: Any = ...
|
||||
filter_template: str = ...
|
||||
window_compatible: bool = ...
|
||||
filter: Any = ...
|
||||
def __init__(
|
||||
self, *args: Any, filter: Optional[Any] = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
def __init__(self, *args: Any, filter: Optional[Any] = ..., **kwargs: Any) -> None: ...
|
||||
def get_source_fields(self) -> Union[List[None], List[Field]]: ...
|
||||
def get_source_expressions(self) -> List[Union[Combinable, WhereNode]]: ...
|
||||
def set_source_expressions(
|
||||
self, exprs: List[Union[Expression, WhereNode]]
|
||||
) -> None: ...
|
||||
def set_source_expressions(self, exprs: List[Union[Expression, WhereNode]]) -> None: ...
|
||||
def resolve_expression(
|
||||
self,
|
||||
query: Query = ...,
|
||||
allow_joins: bool = ...,
|
||||
reuse: None = ...,
|
||||
summarize: bool = ...,
|
||||
for_save: bool = ...,
|
||||
self, query: Query = ..., allow_joins: bool = ..., reuse: None = ..., summarize: bool = ..., for_save: bool = ...
|
||||
) -> Aggregate: ...
|
||||
@property
|
||||
def default_alias(self) -> str: ...
|
||||
def get_group_by_cols(self) -> List[Any]: ...
|
||||
def as_sql(
|
||||
self,
|
||||
compiler: SQLCompiler,
|
||||
connection: DatabaseWrapper,
|
||||
**extra_context: Any
|
||||
self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any
|
||||
) -> Tuple[str, Union[List[Decimal], List[int]]]: ...
|
||||
|
||||
class Avg(Aggregate):
|
||||
@@ -55,19 +42,8 @@ class Count(Aggregate):
|
||||
name: str = ...
|
||||
template: str = ...
|
||||
output_field: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
expression: str,
|
||||
distinct: bool = ...,
|
||||
filter: Optional[Q] = ...,
|
||||
**extra: Any
|
||||
) -> None: ...
|
||||
def convert_value(
|
||||
self,
|
||||
value: Optional[int],
|
||||
expression: Count,
|
||||
connection: DatabaseWrapper,
|
||||
) -> int: ...
|
||||
def __init__(self, expression: str, distinct: bool = ..., filter: Optional[Q] = ..., **extra: Any) -> None: ...
|
||||
def convert_value(self, value: Optional[int], expression: Count, connection: DatabaseWrapper) -> int: ...
|
||||
|
||||
class Max(Aggregate):
|
||||
filter: None
|
||||
@@ -84,9 +60,7 @@ class StdDev(Aggregate):
|
||||
name: str = ...
|
||||
output_field: Any = ...
|
||||
function: str = ...
|
||||
def __init__(
|
||||
self, expression: str, sample: bool = ..., **extra: Any
|
||||
) -> None: ...
|
||||
def __init__(self, expression: str, sample: bool = ..., **extra: Any) -> None: ...
|
||||
|
||||
class Sum(Aggregate):
|
||||
filter: None
|
||||
@@ -100,6 +74,4 @@ class Variance(Aggregate):
|
||||
name: str = ...
|
||||
output_field: Any = ...
|
||||
function: str = ...
|
||||
def __init__(
|
||||
self, expression: str, sample: bool = ..., **extra: Any
|
||||
) -> None: ...
|
||||
def __init__(self, expression: str, sample: bool = ..., **extra: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user