improved version

This commit is contained in:
Maxim Kurnikov
2018-07-29 20:06:41 +03:00
parent c180555415
commit 89bb6eac75
160 changed files with 1007 additions and 607 deletions

View File

@@ -1,10 +1,11 @@
from django.apps.config import AppConfig
from django.db.migrations.state import AppConfigStub
from django.db.models.base import Model
from typing import (
Any,
List,
Optional,
Tuple,
Type,
Union,
)
@@ -12,12 +13,17 @@ from typing import (
class Apps:
def __init__(
self,
installed_apps: Union[Tuple, List[AppConfigStub], List[str]] = ...
installed_apps: Union[Tuple, List[str], List[AppConfigStub]] = ...
) -> None: ...
def check_apps_ready(self) -> None: ...
def check_models_ready(self) -> None: ...
def clear_cache(self) -> None: ...
def do_pending_operations(self, model: Any) -> None: ...
def do_pending_operations(self, model: Type[Model]) -> None: ...
def get_app_config(self, app_label: str) -> AppConfig: ...
def get_containing_app_config(self, object_name: str) -> Optional[AppConfig]: ...
def get_model(self, app_label: str, model_name: None = ..., require_ready: bool = ...) -> Any: ...
def get_model(
self,
app_label: str,
model_name: None = ...,
require_ready: bool = ...
) -> Type[Model]: ...