third iteration of stubs

This commit is contained in:
Maxim Kurnikov committed 2018-08-11 00:19:50 +03:00
1 parent fa718b8e55
commit c6bceb19f4
216 files changed
+16306 -3006

No files matched your search

+12 -8
View File
@@ -1,5 +1,4 @@
from functools import partial
from typing import Any, List, Optional, Tuple, Type, Union
from typing import Any, Callable, List, Optional, Tuple, Type, Union
from django.apps.config import AppConfig
from django.db.migrations.state import AppConfigStub
@@ -15,12 +14,15 @@ class Apps:
apps_ready: bool = ...
loading: bool = ...
def __init__(
self, installed_apps: Union[List[AppConfigStub], Tuple] = ...
self,
installed_apps: Optional[
Union[List[AppConfigStub], List[str], Tuple]
] = ...,
) -> None: ...
models_ready: bool = ...
ready: bool = ...
def populate(
self, installed_apps: Union[List[AppConfigStub], Tuple, List[str]] = ...
self, installed_apps: Union[List[AppConfigStub], List[str], Tuple] = ...
) -> None: ...
def check_apps_ready(self) -> None: ...
def check_models_ready(self) -> None: ...
@@ -36,7 +38,7 @@ class Apps:
require_ready: bool = ...,
) -> Type[Model]: ...
def register_model(self, app_label: str, model: Type[Model]) -> None: ...
def is_installed(self, app_name: Any): ...
def is_installed(self, app_name: str) -> bool: ...
def get_containing_app_config(
self, object_name: str
) -> Optional[AppConfig]: ...
@@ -44,13 +46,15 @@ class Apps:
self, app_label: str, model_name: str
) -> Type[Model]: ...
def get_swappable_settings_name(self, to_string: str) -> Optional[str]: ...
def set_available_apps(self, available: Any) -> None: ...
def set_available_apps(self, available: List[str]) -> None: ...
def unset_available_apps(self) -> None: ...
def set_installed_apps(self, installed: List[str]) -> None: ...
def set_installed_apps(
self, installed: Union[List[str], Tuple[str]]
) -> None: ...
def unset_installed_apps(self) -> None: ...
def clear_cache(self) -> None: ...
def lazy_model_operation(
self, function: partial, *model_keys: Any
self, function: Callable, *model_keys: Any
) -> None: ...
def do_pending_operations(self, model: Type[Model]) -> None: ...