merge with stubgen output

This commit is contained in:
Maxim Kurnikov
2018-07-29 23:25:20 +03:00
parent 496a6274e7
commit 4866354600
294 changed files with 10234 additions and 10842 deletions
+363 -95
View File
@@ -1,118 +1,386 @@
# Stubs for django.db.models.fields (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.exceptions import FieldDoesNotExist as FieldDoesNotExist
from django.db.models.query_utils import RegisterLookupMixin
from typing import Any, Optional
from datetime import date
from django.core.checks.messages import (
Error,
Warning,
)
from django.core.checks.messages import Error, Warning
from django.db.backends.sqlite3.base import DatabaseWrapper
from django.db.models.base import Model
from django.db.models.expressions import OuterRef
from django.db.models.sql.compiler import SQLCompiler
from django.forms.fields import (
BaseTemporalField,
BooleanField,
CharField,
IntegerField,
SplitDateTimeField,
TypedChoiceField,
)
from typing import (
Any,
List,
Optional,
Type,
Union,
)
from django.forms.fields import BaseTemporalField, BooleanField, CharField, IntegerField, SplitDateTimeField, TypedChoiceField
from typing import Any, List, Optional, Type, Union
class Empty: ...
class NOT_PROVIDED: ...
BLANK_CHOICE_DASH: Any
class AutoField:
def __init__(self, *args, **kwargs) -> None: ...
class Field(RegisterLookupMixin):
empty_strings_allowed: bool = ...
empty_values: Any = ...
creation_counter: int = ...
auto_creation_counter: int = ...
default_validators: Any = ...
default_error_messages: Any = ...
system_check_deprecated_details: Any = ...
system_check_removed_details: Any = ...
hidden: bool = ...
many_to_many: Any = ...
many_to_one: Any = ...
one_to_many: Any = ...
one_to_one: Any = ...
related_model: Any = ...
def _description(self): ...
description: Any = ...
name: Any = ...
verbose_name: Any = ...
_verbose_name: Any = ...
primary_key: Any = ...
remote_field: Any = ...
is_relation: Any = ...
default: Any = ...
editable: Any = ...
serialize: Any = ...
unique_for_date: Any = ...
unique_for_month: Any = ...
unique_for_year: Any = ...
choices: Any = ...
help_text: Any = ...
db_index: Any = ...
db_column: Any = ...
_db_tablespace: Any = ...
auto_created: Any = ...
_validators: Any = ...
_error_messages: Any = ...
error_messages: Any = ...
def __init__(self, verbose_name: Optional[Any] = ..., name: Optional[Any] = ..., primary_key: bool = ..., max_length: Optional[Any] = ..., unique: bool = ..., blank: bool = ..., null: bool = ..., db_index: bool = ..., rel: Optional[Any] = ..., default: Any = ..., editable: bool = ..., serialize: bool = ..., unique_for_date: Optional[Any] = ..., unique_for_month: Optional[Any] = ..., unique_for_year: Optional[Any] = ..., choices: Optional[Any] = ..., help_text: str = ..., db_column: Optional[Any] = ..., db_tablespace: Optional[Any] = ..., auto_created: bool = ..., validators: Any = ..., error_messages: Optional[Any] = ...) -> None: ...
def __str__(self): ...
def __repr__(self): ...
def check(self, **kwargs: Any): ...
def _check_field_name(self): ...
def _check_choices(self): ...
def _check_db_index(self): ...
def _check_null_allowed_for_primary_keys(self): ...
def _check_backend_specific_checks(self, **kwargs: Any): ...
def _check_validators(self): ...
def _check_deprecation_details(self): ...
def get_col(self, alias: Any, output_field: Optional[Any] = ...): ...
def cached_col(self): ...
def select_format(self, compiler: Any, sql: Any, params: Any): ...
def deconstruct(self): ...
def clone(self): ...
def __eq__(self, other: Any): ...
def __lt__(self, other: Any): ...
def __hash__(self): ...
def __deepcopy__(self, memodict: Any): ...
def __copy__(self): ...
def __reduce__(self): ...
def get_pk_value_on_save(self, instance: Any): ...
def to_python(self, value: Any): ...
def validators(self): ...
def run_validators(self, value: Any): ...
def validate(self, value: Any, model_instance: Any): ...
def clean(self, value: Any, model_instance: Any): ...
def db_type_parameters(self, connection: Any): ...
def db_check(self, connection: Any): ...
def db_type(self, connection: Any): ...
def rel_db_type(self, connection: Any): ...
def cast_db_type(self, connection: Any): ...
def db_parameters(self, connection: Any): ...
def db_type_suffix(self, connection: Any): ...
def get_db_converters(self, connection: Any): ...
@property
def unique(self): ...
@property
def db_tablespace(self): ...
concrete: Any = ...
def set_attributes_from_name(self, name: Any) -> None: ...
model: Any = ...
def contribute_to_class(self, cls: Any, name: Any, private_only: bool = ...) -> None: ...
def get_filter_kwargs_for_object(self, obj: Any): ...
def get_attname(self): ...
def get_attname_column(self): ...
def get_internal_type(self): ...
def pre_save(self, model_instance: Any, add: Any): ...
def get_prep_value(self, value: Any): ...
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
def get_db_prep_save(self, value: Any, connection: Any): ...
def has_default(self): ...
def get_default(self): ...
def _get_default(self): ...
def get_choices(self, include_blank: bool = ..., blank_choice: Any = ..., limit_choices_to: Optional[Any] = ...): ...
def value_to_string(self, obj: Any): ...
def _get_flatchoices(self): ...
flatchoices: Any = ...
def save_form_data(self, instance: Any, data: Any) -> None: ...
def formfield(self, form_class: Optional[Any] = ..., choices_form_class: Optional[Any] = ..., **kwargs: Any): ...
def value_from_object(self, obj: Any): ...
class AutoField(Field):
description: Any = ...
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def check(self, **kwargs: Any) -> List[Any]: ...
def _check_primary_key(self) -> List[Any]: ...
def check(self, **kwargs) -> List[Any]: ...
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs) -> None: ...
def deconstruct(self) -> Any: ...
def formfield(self, **kwargs) -> None: ...
def get_db_prep_value(
self,
value: Union[str, int],
connection: DatabaseWrapper,
prepared: bool = ...
) -> Union[str, int]: ...
def get_internal_type(self) -> str: ...
def get_prep_value(self, value: Any) -> Optional[Union[int, OuterRef]]: ...
def rel_db_type(self, connection: DatabaseWrapper) -> str: ...
def to_python(self, value: Optional[Union[str, int]]) -> Optional[int]: ...
def rel_db_type(self, connection: DatabaseWrapper) -> str: ...
def validate(self, value: int, model_instance: Model) -> None: ...
def get_db_prep_value(self, value: Union[str, int], connection: DatabaseWrapper, prepared: bool = ...) -> Union[str, int]: ...
def get_prep_value(self, value: Any) -> Optional[Union[int, OuterRef]]: ...
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs: Any) -> None: ...
def formfield(self, **kwargs: Any) -> None: ...
class BigAutoField:
class BigAutoField(AutoField):
description: Any = ...
def get_internal_type(self) -> str: ...
def rel_db_type(self, connection: DatabaseWrapper) -> str: ...
class BigIntegerField:
def formfield(self, **kwargs) -> IntegerField: ...
class BooleanField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def get_internal_type(self) -> str: ...
def to_python(self, value: Optional[Union[str, int]]) -> bool: ...
def get_prep_value(self, value: Optional[Union[str, int]]) -> Optional[bool]: ...
def formfield(self, **kwargs: Any) -> BooleanField: ...
class CharField(Field):
description: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def check(self, **kwargs: Any) -> List[Error]: ...
def _check_max_length_attribute(self, **kwargs: Any) -> List[Error]: ...
def cast_db_type(self, connection: Any): ...
def get_internal_type(self) -> str: ...
def to_python(self, value: Optional[Union[int, str, Model]]) -> Optional[str]: ...
def get_prep_value(self, value: object) -> object: ...
def formfield(self, **kwargs: Any) -> Union[CharField, TypedChoiceField]: ...
class BinaryField:
def __init__(self, *args, **kwargs) -> None: ...
class CommaSeparatedIntegerField(CharField):
default_validators: Any = ...
description: Any = ...
system_check_removed_details: Any = ...
class DateTimeCheckMixin:
def check(self, **kwargs: Any): ...
def _check_mutually_exclusive_options(self): ...
def _check_fix_default_value(self): ...
class DateField(DateTimeCheckMixin, Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def __init__(self, verbose_name: Optional[str] = ..., name: Optional[str] = ..., auto_now: bool = ..., auto_now_add: bool = ..., **kwargs: Any) -> None: ...
def _check_fix_default_value(self) -> List[Warning]: ...
def deconstruct(self) -> Any: ...
def get_db_prep_value(
self,
value: Optional[Union[bytes, memoryview]],
connection: DatabaseWrapper,
prepared: bool = ...
) -> Optional[memoryview]: ...
def get_default(self) -> Optional[bytes]: ...
def get_internal_type(self) -> str: ...
def get_placeholder(
self,
value: Optional[memoryview],
compiler: SQLCompiler,
connection: DatabaseWrapper
) -> str: ...
def to_python(self, value: Any): ...
def pre_save(self, model_instance: Model, add: bool) -> Optional[date]: ...
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs: Any) -> None: ...
def get_prep_value(self, value: Optional[Union[str, date]]) -> Optional[date]: ...
def get_db_prep_value(self, value: Optional[Union[str, date]], connection: DatabaseWrapper, prepared: bool = ...) -> Optional[str]: ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any) -> Union[BaseTemporalField, SplitDateTimeField]: ...
class DateTimeField(DateField):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def _check_fix_default_value(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def pre_save(self, model_instance: Any, add: Any): ...
def get_prep_value(self, value: Any): ...
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any): ...
class DecimalField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def __init__(self, verbose_name: Optional[Any] = ..., name: Optional[Any] = ..., max_digits: Optional[Any] = ..., decimal_places: Optional[Any] = ..., **kwargs: Any) -> None: ...
def check(self, **kwargs: Any): ...
def _check_decimal_places(self): ...
def _check_max_digits(self): ...
def _check_decimal_places_and_max_digits(self, **kwargs: Any): ...
def validators(self): ...
def context(self): ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_db_prep_save(self, value: Any, connection: Any): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
class DurationField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
def get_db_converters(self, connection: Any): ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any): ...
class EmailField(CharField):
default_validators: Any = ...
description: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def deconstruct(self): ...
def formfield(self, **kwargs: Any): ...
class FilePathField(Field):
description: Any = ...
def __init__(self, verbose_name: Optional[Any] = ..., name: Optional[Any] = ..., path: str = ..., match: Optional[Any] = ..., recursive: bool = ..., allow_files: bool = ..., allow_folders: bool = ..., **kwargs: Any) -> None: ...
def check(self, **kwargs: Any): ...
def _check_allowing_files_or_folders(self, **kwargs: Any): ...
def deconstruct(self): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
def get_internal_type(self): ...
class FloatField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
class IntegerField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def check(self, **kwargs: Any): ...
def _check_max_length_warning(self): ...
def validators(self): ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
class BigIntegerField(IntegerField):
empty_strings_allowed: bool = ...
description: Any = ...
MAX_BIGINT: int = ...
def get_internal_type(self) -> str: ...
def formfield(self, **kwargs: Any) -> IntegerField: ...
class IPAddressField(Field):
empty_strings_allowed: bool = ...
description: Any = ...
system_check_removed_details: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def deconstruct(self): ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self): ...
class GenericIPAddressField(Field):
empty_strings_allowed: bool = ...
description: Any = ...
default_error_messages: Any = ...
unpack_ipv4: Any = ...
protocol: Any = ...
def __init__(self, verbose_name: Optional[Any] = ..., name: Optional[Any] = ..., protocol: str = ..., unpack_ipv4: bool = ..., *args: Any, **kwargs: Any) -> None: ...
def check(self, **kwargs: Any): ...
def _check_blank_and_null_values(self, **kwargs: Any): ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
class NullBooleanField(BooleanField):
default_error_messages: Any = ...
description: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
class PositiveIntegerRelDbTypeMixin:
def rel_db_type(self, connection: Any): ...
class PositiveIntegerField(PositiveIntegerRelDbTypeMixin, IntegerField):
description: Any = ...
def get_internal_type(self): ...
def formfield(self, **kwargs: Any): ...
class PositiveSmallIntegerField(PositiveIntegerRelDbTypeMixin, IntegerField):
description: Any = ...
def get_internal_type(self): ...
def formfield(self, **kwargs: Any): ...
class SlugField(CharField):
default_validators: Any = ...
description: Any = ...
allow_unicode: Any = ...
def __init__(self, *args: Any, max_length: int = ..., db_index: bool = ..., allow_unicode: bool = ..., **kwargs: Any) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
def formfield(self, **kwargs: Any): ...
class SmallIntegerField(IntegerField):
description: Any = ...
def get_internal_type(self): ...
class TextField(Field):
description: Any = ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
class TimeField(DateTimeCheckMixin, Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def __init__(self, verbose_name: Optional[Any] = ..., name: Optional[Any] = ..., auto_now: bool = ..., auto_now_add: bool = ..., **kwargs: Any) -> None: ...
def _check_fix_default_value(self): ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def pre_save(self, model_instance: Any, add: Any): ...
def get_prep_value(self, value: Any): ...
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any): ...
class URLField(CharField):
default_validators: Any = ...
description: Any = ...
def __init__(self, verbose_name: Optional[Any] = ..., name: Optional[Any] = ..., **kwargs: Any) -> None: ...
def deconstruct(self): ...
def formfield(self, **kwargs: Any): ...
class BinaryField(Field):
description: Any = ...
empty_values: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def deconstruct(self) -> Any: ...
def get_internal_type(self) -> str: ...
def get_placeholder(self, value: Optional[memoryview], compiler: SQLCompiler, connection: DatabaseWrapper) -> str: ...
def get_default(self) -> Optional[bytes]: ...
def get_db_prep_value(self, value: Optional[Union[bytes, memoryview]], connection: DatabaseWrapper, prepared: bool = ...) -> Optional[memoryview]: ...
def value_to_string(self, obj: Any): ...
def to_python(self, value: Optional[Union[str, bytes]]) -> Optional[Union[bytes, memoryview]]: ...
class BooleanField:
def formfield(self, **kwargs) -> BooleanField: ...
def get_internal_type(self) -> str: ...
def get_prep_value(self, value: Optional[Union[str, int]]) -> Optional[bool]: ...
def to_python(self, value: Optional[Union[str, int]]) -> bool: ...
class CharField:
def __init__(self, *args, **kwargs) -> None: ...
def _check_max_length_attribute(self, **kwargs) -> List[Error]: ...
def check(self, **kwargs) -> List[Error]: ...
def formfield(self, **kwargs) -> Union[CharField, TypedChoiceField]: ...
def get_internal_type(self) -> str: ...
def get_prep_value(self, value: object) -> object: ...
def to_python(self, value: Optional[Union[int, str, Model]]) -> Optional[str]: ...
class DateField:
def __init__(
self,
verbose_name: Optional[str] = ...,
name: Optional[str] = ...,
auto_now: bool = ...,
auto_now_add: bool = ...,
**kwargs
) -> None: ...
def _check_fix_default_value(self) -> List[Warning]: ...
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs) -> None: ...
def deconstruct(self) -> Any: ...
def formfield(
self,
**kwargs
) -> Union[BaseTemporalField, SplitDateTimeField]: ...
def get_db_prep_value(
self,
value: Optional[Union[str, date]],
connection: DatabaseWrapper,
prepared: bool = ...
) -> Optional[str]: ...
def get_internal_type(self) -> str: ...
def get_prep_value(self, value: Optional[Union[str, date]]) -> Optional[date]: ...
def pre_save(self, model_instance: Model, add: bool) -> Optional[date]: ...
class UUIDField(Field):
default_error_messages: Any = ...
description: str = ...
empty_strings_allowed: bool = ...
def __init__(self, verbose_name: Optional[Any] = ..., **kwargs: Any) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
def to_python(self, value: Any): ...
def formfield(self, **kwargs: Any): ...