run black over stubs, add checking to travis

This commit is contained in:
Maxim Kurnikov
2018-12-03 18:52:44 +03:00
parent d5bc7d4ab2
commit cf6119bf9b
420 changed files with 2295 additions and 8384 deletions

View File

@@ -1,5 +1,4 @@
from typing import (Any, Callable, Dict, Iterator, List, Optional, Set, Tuple,
Type, Union)
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union
from django.apps.config import AppConfig
from django.contrib.auth.base_user import AbstractBaseUser
@@ -25,16 +24,9 @@ DEFAULT_NAMES: Any
def normalize_together(
option_together: Any
) -> Union[
List[Union[Tuple[str, str], int]], Set[Tuple[str, str]], Tuple, int, str
]: ...
) -> Union[List[Union[Tuple[str, str], int]], Set[Tuple[str, str]], Tuple, int, str]: ...
def make_immutable_fields_list(
name: str,
data: Union[
Iterator[Any],
List[Union[ArrayField, CIText]],
List[Union[Field, FieldCacheMixin]],
],
name: str, data: Union[Iterator[Any], List[Union[ArrayField, CIText]], List[Union[Field, FieldCacheMixin]]]
) -> ImmutableList: ...
class Options:
@@ -50,9 +42,7 @@ class Options:
REVERSE_PROPERTIES: Any = ...
default_apps: Any = ...
local_fields: List[django.db.models.fields.Field] = ...
local_many_to_many: List[
django.db.models.fields.related.ManyToManyField
] = ...
local_many_to_many: List[django.db.models.fields.related.ManyToManyField] = ...
private_fields: List[Any] = ...
local_managers: List[django.db.models.manager.Manager] = ...
base_manager_name: None = ...
@@ -100,16 +90,7 @@ class Options:
default_related_name: None = ...
def __init__(
self,
meta: Optional[
Type[
Union[
AbstractBaseUser.Meta,
AbstractUser.Meta,
PermissionsMixin.Meta,
AbstractBaseSession.Meta,
]
]
],
meta: Optional[Type[Union[AbstractBaseUser.Meta, AbstractUser.Meta, PermissionsMixin.Meta, AbstractBaseSession.Meta]]],
app_label: Optional[str] = ...,
) -> None: ...
@property
@@ -121,14 +102,10 @@ class Options:
@property
def installed(self): ...
model: Type[django.db.models.base.Model] = ...
original_attrs: Dict[
str, Union[List[str], django.apps.registry.Apps, str]
] = ...
original_attrs: Dict[str, Union[List[str], django.apps.registry.Apps, str]] = ...
def contribute_to_class(self, cls: Type[Model], name: str) -> None: ...
def add_manager(self, manager: Manager) -> None: ...
def add_field(
self, field: Union[GenericForeignKey, Field], private: bool = ...
) -> None: ...
def add_field(self, field: Union[GenericForeignKey, Field], private: bool = ...) -> None: ...
def setup_pk(self, field: Field) -> None: ...
def setup_proxy(self, target: Type[Model]) -> None: ...
def can_migrate(self, connection: Union[DatabaseWrapper, str]) -> bool: ...
@@ -146,16 +123,10 @@ class Options:
def many_to_many(self) -> ImmutableList: ...
def related_objects(self) -> ImmutableList: ...
def fields_map(self) -> Dict[str, ForeignObjectRel]: ...
def get_field(
self, field_name: Union[Callable, str]
) -> Union[Field, mixins.FieldCacheMixin]: ...
def get_field(self, field_name: Union[Callable, str]) -> Union[Field, mixins.FieldCacheMixin]: ...
def get_base_chain(self, model: Type[Model]) -> List[Type[Model]]: ...
def get_parent_list(self) -> List[Type[Model]]: ...
def get_ancestor_link(
self, ancestor: Type[Model]
) -> Optional[OneToOneField]: ...
def get_ancestor_link(self, ancestor: Type[Model]) -> Optional[OneToOneField]: ...
def get_path_to_parent(self, parent: Type[Model]) -> List[PathInfo]: ...
def get_path_from_parent(self, parent: Type[Model]) -> List[PathInfo]: ...
def get_fields(
self, include_parents: bool = ..., include_hidden: bool = ...
) -> ImmutableList: ...
def get_fields(self, include_parents: bool = ..., include_hidden: bool = ...) -> ImmutableList: ...