Files
django-stubs/django-stubs/contrib/postgres/fields/array.pyi
2018-12-01 16:26:53 +03:00

44 lines
1.4 KiB
Python

from typing import Any, Dict, List, Optional, Tuple, Union, TypeVar, Generic
from django.db.models.fields import Field
from .mixins import CheckFieldDefaultMixin
_T = TypeVar('_T', bound=Field)
class ArrayField(CheckFieldDefaultMixin, Field, Generic[_T]):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
base_field: Any = ...
size: Any = ...
default_validators: Any = ...
from_db_value: Any = ...
def __init__(
self, base_field: _T, size: None = ..., **kwargs: Any
) -> None: ...
@property
def model(self): ...
@model.setter
def model(self, model: Any) -> None: ...
def check(self, **kwargs: Any) -> List[Any]: ...
def set_attributes_from_name(self, name: str) -> None: ...
@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 to_python(self, value: Any): ...
def value_to_string(self, obj: Any): ...
def get_transform(self, name: Any): ...
def validate(self, value: Any, model_instance: Any) -> None: ...
def run_validators(self, value: Any) -> None: ...
def formfield(self, **kwargs: Any): ...
def __get__(self, instance, owner) -> List[_T]: ...