mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 16:27:09 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -7,8 +7,7 @@ from django.db.models.lookups import Exact, In
|
||||
|
||||
from .mixins import CheckFieldDefaultMixin
|
||||
|
||||
_T = TypeVar('_T', bound=Field)
|
||||
|
||||
_T = TypeVar("_T", bound=Field)
|
||||
|
||||
class ArrayField(CheckFieldDefaultMixin, Field, Generic[_T]):
|
||||
empty_strings_allowed: bool = ...
|
||||
@@ -17,10 +16,7 @@ class ArrayField(CheckFieldDefaultMixin, Field, Generic[_T]):
|
||||
size: Any = ...
|
||||
default_validators: Any = ...
|
||||
from_db_value: Any = ...
|
||||
|
||||
def __init__(
|
||||
self, base_field: Field, size: None = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
def __init__(self, base_field: Field, size: None = ..., **kwargs: Any) -> None: ...
|
||||
@property
|
||||
def model(self): ...
|
||||
@model.setter
|
||||
@@ -30,14 +26,8 @@ class ArrayField(CheckFieldDefaultMixin, Field, Generic[_T]):
|
||||
@property
|
||||
def description(self): ...
|
||||
def db_type(self, connection: Any): ...
|
||||
def get_db_prep_value(
|
||||
self, value: Any, connection: Any, prepared: bool = ...
|
||||
): ...
|
||||
def deconstruct(
|
||||
self
|
||||
) -> Tuple[
|
||||
None, str, List[Any], Dict[str, Optional[Union[bool, Field]]]
|
||||
]: ...
|
||||
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
|
||||
def deconstruct(self) -> Tuple[None, str, List[Any], Dict[str, Optional[Union[bool, Field]]]]: ...
|
||||
def to_python(self, value: Any): ...
|
||||
def value_to_string(self, obj: Any): ...
|
||||
def get_transform(self, name: Any): ...
|
||||
@@ -69,9 +59,7 @@ class ArrayInLookup(In):
|
||||
class IndexTransform(Transform):
|
||||
index: Any = ...
|
||||
base_field: Any = ...
|
||||
def __init__(
|
||||
self, index: Any, base_field: Any, *args: Any, **kwargs: Any
|
||||
) -> None: ...
|
||||
def __init__(self, index: Any, base_field: Any, *args: Any, **kwargs: Any) -> None: ...
|
||||
def as_sql(self, compiler: Any, connection: Any): ...
|
||||
@property
|
||||
def output_field(self): ...
|
||||
@@ -85,9 +73,7 @@ class IndexTransformFactory:
|
||||
class SliceTransform(Transform):
|
||||
start: Any = ...
|
||||
end: Any = ...
|
||||
def __init__(
|
||||
self, start: Any, end: Any, *args: Any, **kwargs: Any
|
||||
) -> None: ...
|
||||
def __init__(self, start: Any, end: Any, *args: Any, **kwargs: Any) -> None: ...
|
||||
def as_sql(self, compiler: Any, connection: Any): ...
|
||||
|
||||
class SliceTransformFactory:
|
||||
|
||||
Reference in New Issue
Block a user