mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-11-05 20:03:00 +08:00
make pep561 compliant
This commit is contained in:
1 parent
89bb6eac75
commit
f471b7b1bf
372 files changed
+51
No files matched your search
@@ -0,0 +1,21 @@
|
||||
from django.db.models.base import Model
|
||||
from typing import (
|
||||
Any,
|
||||
Iterator,
|
||||
Type,
|
||||
)
|
||||
|
||||
|
||||
class AppConfig:
|
||||
def __init__(self, app_name: str, app_module: Any) -> None: ...
|
||||
def _path_from_module(self, module: Any) -> str: ...
|
||||
@classmethod
|
||||
def create(cls, entry: str) -> AppConfig: ...
|
||||
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]]: ...
|
||||
def import_models(self) -> None: ...
|
||||
def ready(self) -> None: ...
|
||||
@@ -0,0 +1,29 @@
|
||||
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,
|
||||
)
|
||||
|
||||
|
||||
class Apps:
|
||||
def __init__(
|
||||
self,
|
||||
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: 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 = ...
|
||||
) -> Type[Model]: ...
|
||||
Reference in new issue
Block a user