black reformat, some fixes

This commit is contained in:
Maxim Kurnikov
2018-12-06 19:13:06 +03:00
parent 25a71a7ef5
commit 5ec2830ba6
108 changed files with 673 additions and 187 deletions

View File

@@ -141,7 +141,9 @@ class TruncBase(TimezoneMixin, Transform):
summarize: bool = ...,
for_save: bool = ...,
) -> TruncBase: ...
def convert_value(self, value: datetime, expression: models.functions.TruncBase, connection: DatabaseWrapper) -> datetime: ...
def convert_value(
self, value: datetime, expression: models.functions.TruncBase, connection: DatabaseWrapper
) -> datetime: ...
class Trunc(TruncBase):
contains_aggregate: bool

View File

@@ -6,7 +6,9 @@ from django.db.models.expressions import Combinable, Expression, Value
from django.db.models.sql.compiler import SQLCompiler
class BytesToCharFieldConversionMixin:
def convert_value(self, value: str, expression: BytesToCharFieldConversionMixin, connection: DatabaseWrapper) -> str: ...
def convert_value(
self, value: str, expression: BytesToCharFieldConversionMixin, connection: DatabaseWrapper
) -> str: ...
class Chr(Transform):
contains_aggregate: bool
@@ -18,7 +20,9 @@ class Chr(Transform):
lookup_name: str = ...
def as_mysql(self, compiler: Any, connection: Any): ...
def as_oracle(self, compiler: Any, connection: Any): ...
def as_sqlite(self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any) -> Tuple[str, List[int]]: ...
def as_sqlite(
self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any
) -> Tuple[str, List[int]]: ...
class ConcatPair(Func):
contains_aggregate: bool
@@ -54,7 +58,9 @@ class Left(Func):
arity: int = ...
def __init__(self, expression: str, length: Union[Value, int], **extra: Any) -> None: ...
def get_substr(self) -> Substr: ...
def use_substr(self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any) -> Tuple[str, List[int]]: ...
def use_substr(
self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any
) -> Tuple[str, List[int]]: ...
as_oracle: Any = ...
as_sqlite: Any = ...
@@ -111,7 +117,9 @@ class Ord(Transform):
lookup_name: str = ...
output_field: Any = ...
def as_mysql(self, compiler: Any, connection: Any, **extra_context: Any): ...
def as_sqlite(self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any) -> Tuple[str, List[Any]]: ...
def as_sqlite(
self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any
) -> Tuple[str, List[Any]]: ...
class Repeat(BytesToCharFieldConversionMixin, Func):
contains_aggregate: bool