better stubs

This commit is contained in:
Maxim Kurnikov committed 2018-08-05 03:13:19 +03:00
1 parent 4013fe4d03
commit fa718b8e55
380 files changed
+11805 -8503

No files matched your search

+12 -17
View File
@@ -1,29 +1,24 @@
# Stubs for django.apps.config (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from typing import Any, Iterator, Optional, Type
from django.db.models.base import Model
from typing import Any, Iterator, Type
MODELS_MODULE_NAME: str
class AppConfig:
name: Any = ...
name: str = ...
module: Any = ...
apps: Any = ...
label: Any = ...
verbose_name: Any = ...
path: Any = ...
models_module: Any = ...
models: Any = ...
def __init__(self, app_name: str, app_module: Any) -> None: ...
def __repr__(self): ...
def _path_from_module(self, module: Any) -> str: ...
apps: None = ...
label: str = ...
verbose_name: str = ...
path: str = ...
models_module: None = ...
models: None = ...
def __init__(self, app_name: str, app_module: None) -> None: ...
@classmethod
def create(cls, entry: str) -> AppConfig: ...
def get_model(self, model_name: str, require_ready: bool = ...) -> Type[Model]: ...
def get_model(
self, model_name: str, require_ready: bool = ...
) -> Type[Model]: ...
def get_models(
self, include_auto_created: bool = ..., include_swapped: bool = ...
) -> Iterator[Type[Model]]: ...
+31 -22
View File
@@ -1,48 +1,57 @@
# Stubs for django.apps.registry (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .config import AppConfig
from typing import Any, Optional
from functools import partial
from typing import Any, List, Optional, Tuple, Type, Union
from django.apps.config import AppConfig
from django.db.migrations.state import AppConfigStub
from django.db.models.base import Model
from typing import List, Optional, Tuple, Type, Union
from .config import AppConfig
class Apps:
all_models: Any = ...
app_configs: Any = ...
stored_app_configs: Any = ...
all_models: collections.defaultdict = ...
app_configs: collections.OrderedDict = ...
stored_app_configs: List[Any] = ...
apps_ready: bool = ...
_lock: Any = ...
loading: bool = ...
_pending_operations: Any = ...
def __init__(
self, installed_apps: Union[Tuple, List[str], List[AppConfigStub]] = ...
self, installed_apps: Union[List[AppConfigStub], Tuple] = ...
) -> None: ...
models_ready: bool = ...
ready: bool = ...
def populate(self, installed_apps: Optional[Any] = ...): ...
def populate(
self, installed_apps: Union[List[AppConfigStub], Tuple, List[str]] = ...
) -> None: ...
def check_apps_ready(self) -> None: ...
def check_models_ready(self) -> None: ...
def get_app_configs(self): ...
def get_app_config(self, app_label: str) -> AppConfig: ...
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...): ...
def get_models(
self, include_auto_created: bool = ..., include_swapped: bool = ...
) -> List[Type[Model]]: ...
def get_model(
self, app_label: str, model_name: None = ..., require_ready: bool = ...
self,
app_label: str,
model_name: Optional[str] = ...,
require_ready: bool = ...,
) -> Type[Model]: ...
def register_model(self, app_label: Any, model: Any) -> None: ...
def register_model(self, app_label: str, model: Type[Model]) -> None: ...
def is_installed(self, app_name: Any): ...
def get_containing_app_config(self, object_name: str) -> Optional[AppConfig]: ...
def get_registered_model(self, app_label: Any, model_name: Any): ...
def get_swappable_settings_name(self, to_string: Any): ...
def get_containing_app_config(
self, object_name: str
) -> Optional[AppConfig]: ...
def get_registered_model(
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 unset_available_apps(self) -> None: ...
def set_installed_apps(self, installed: Any) -> None: ...
def set_installed_apps(self, installed: List[str]) -> None: ...
def unset_installed_apps(self) -> None: ...
def clear_cache(self) -> None: ...
def lazy_model_operation(self, function: Any, *model_keys: Any) -> None: ...
def lazy_model_operation(
self, function: partial, *model_keys: Any
) -> None: ...
def do_pending_operations(self, model: Type[Model]) -> None: ...
apps: Any