mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 08:17:08 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -5,14 +5,8 @@ from django.db.models import Func, Transform
|
||||
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
|
||||
@@ -24,12 +18,7 @@ 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
|
||||
@@ -38,9 +27,7 @@ class ConcatPair(Func):
|
||||
output_field: django.db.models.fields.CharField
|
||||
source_expressions: List[django.db.models.expressions.Combinable]
|
||||
function: str = ...
|
||||
def as_sqlite(
|
||||
self, compiler: SQLCompiler, connection: DatabaseWrapper
|
||||
) -> Tuple[str, List[str]]: ...
|
||||
def as_sqlite(self, compiler: SQLCompiler, connection: DatabaseWrapper) -> Tuple[str, List[str]]: ...
|
||||
def as_mysql(self, compiler: Any, connection: Any): ...
|
||||
def coalesce(self) -> ConcatPair: ...
|
||||
|
||||
@@ -65,16 +52,9 @@ class Left(Func):
|
||||
source_expressions: List[django.db.models.expressions.Combinable]
|
||||
function: str = ...
|
||||
arity: int = ...
|
||||
def __init__(
|
||||
self, expression: str, length: Union[Value, int], **extra: Any
|
||||
) -> None: ...
|
||||
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 = ...
|
||||
|
||||
@@ -109,13 +89,7 @@ class LPad(BytesToCharFieldConversionMixin, Func):
|
||||
output_field: django.db.models.fields.CharField
|
||||
source_expressions: List[django.db.models.expressions.Combinable]
|
||||
function: str = ...
|
||||
def __init__(
|
||||
self,
|
||||
expression: str,
|
||||
length: Union[Length, int],
|
||||
fill_text: Value = ...,
|
||||
**extra: Any
|
||||
) -> None: ...
|
||||
def __init__(self, expression: str, length: Union[Length, int], fill_text: Value = ..., **extra: Any) -> None: ...
|
||||
|
||||
class LTrim(Transform):
|
||||
contains_aggregate: bool
|
||||
@@ -136,15 +110,8 @@ class Ord(Transform):
|
||||
function: str = ...
|
||||
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_mysql(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||
def as_sqlite(self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any) -> Tuple[str, List[Any]]: ...
|
||||
|
||||
class Repeat(BytesToCharFieldConversionMixin, Func):
|
||||
contains_aggregate: bool
|
||||
@@ -154,15 +121,8 @@ class Repeat(BytesToCharFieldConversionMixin, Func):
|
||||
output_field: django.db.models.fields.CharField
|
||||
source_expressions: List[django.db.models.expressions.Combinable]
|
||||
function: str = ...
|
||||
def __init__(
|
||||
self,
|
||||
expression: Union[Value, str],
|
||||
number: Union[Length, int],
|
||||
**extra: Any
|
||||
) -> None: ...
|
||||
def as_oracle(
|
||||
self, compiler: Any, connection: Any, **extra_context: Any
|
||||
): ...
|
||||
def __init__(self, expression: Union[Value, str], number: Union[Length, int], **extra: Any) -> None: ...
|
||||
def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||
|
||||
class Replace(Func):
|
||||
contains_aggregate: bool
|
||||
@@ -173,13 +133,7 @@ class Replace(Func):
|
||||
output_field: django.db.models.fields.CharField
|
||||
source_expressions: List[django.db.models.expressions.Combinable]
|
||||
function: str = ...
|
||||
def __init__(
|
||||
self,
|
||||
expression: Combinable,
|
||||
text: Value,
|
||||
replacement: Value = ...,
|
||||
**extra: Any
|
||||
) -> None: ...
|
||||
def __init__(self, expression: Combinable, text: Value, replacement: Value = ..., **extra: Any) -> None: ...
|
||||
|
||||
class Right(Left):
|
||||
contains_aggregate: bool
|
||||
@@ -238,12 +192,8 @@ class Substr(Func):
|
||||
length: Optional[Union[Value, int]] = ...,
|
||||
**extra: Any
|
||||
) -> None: ...
|
||||
def as_sqlite(
|
||||
self, compiler: SQLCompiler, connection: DatabaseWrapper
|
||||
) -> Tuple[str, List[Union[int, str]]]: ...
|
||||
def as_oracle(
|
||||
self, compiler: SQLCompiler, connection: DatabaseWrapper
|
||||
) -> Tuple[str, List[int]]: ...
|
||||
def as_sqlite(self, compiler: SQLCompiler, connection: DatabaseWrapper) -> Tuple[str, List[Union[int, str]]]: ...
|
||||
def as_oracle(self, compiler: SQLCompiler, connection: DatabaseWrapper) -> Tuple[str, List[int]]: ...
|
||||
|
||||
class Trim(Transform):
|
||||
contains_aggregate: bool
|
||||
|
||||
Reference in New Issue
Block a user