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
+6 -24
View File
@@ -23,9 +23,7 @@ class DatabaseErrorWrapper:
wrapper: django.db.backends.sqlite3.base.DatabaseWrapper = ...
def __init__(self, wrapper: DatabaseWrapper) -> None: ...
def __enter__(self) -> None: ...
def __exit__(
self, exc_type: None, exc_value: None, traceback: None
) -> None: ...
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
def __call__(self, func: Callable) -> Callable: ...
def load_backend(backend_name: str) -> Any: ...
@@ -33,21 +31,9 @@ def load_backend(backend_name: str) -> Any: ...
class ConnectionDoesNotExist(Exception): ...
class ConnectionHandler:
databases: Dict[
str, Dict[str, Optional[Union[Dict[str, Optional[bool]], int, str]]]
]
def __init__(
self, databases: Dict[str, Dict[str, Union[Dict[str, str], str]]] = ...
) -> None: ...
def databases(
self
) -> Dict[
str,
Union[
Dict[str, Union[Dict[str, bool], str]],
Dict[str, Union[Dict[str, str], str]],
],
]: ...
databases: Dict[str, Dict[str, Optional[Union[Dict[str, Optional[bool]], int, str]]]]
def __init__(self, databases: Dict[str, Dict[str, Union[Dict[str, str], str]]] = ...) -> None: ...
def databases(self) -> Dict[str, Union[Dict[str, Union[Dict[str, bool], str]], Dict[str, Union[Dict[str, str], str]]]]: ...
def ensure_defaults(self, alias: str) -> None: ...
def prepare_test_settings(self, alias: str) -> None: ...
def __getitem__(self, alias: str) -> BaseDatabaseWrapper: ...
@@ -63,11 +49,7 @@ class ConnectionRouter:
def routers(self) -> List[Mock]: ...
db_for_read: Any = ...
db_for_write: Any = ...
def allow_relation(
self, obj1: Model, obj2: Model, **hints: Any
) -> bool: ...
def allow_relation(self, obj1: Model, obj2: Model, **hints: Any) -> bool: ...
def allow_migrate(self, db: str, app_label: str, **hints: Any) -> bool: ...
def allow_migrate_model(self, db: str, model: Type[Model]) -> bool: ...
def get_migratable_models(
self, app_config: AppConfig, db: str, include_auto_created: bool = ...
) -> List[Type[Model]]: ...
def get_migratable_models(self, app_config: AppConfig, db: str, include_auto_created: bool = ...) -> List[Type[Model]]: ...