mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
35 lines
987 B
Python
35 lines
987 B
Python
from django.apps.registry import Apps
|
|
from django.db.models.fields import Field
|
|
from django.db.models.indexes import Index
|
|
from typing import (
|
|
Any,
|
|
Iterator,
|
|
)
|
|
|
|
|
|
class AppConfigStub:
|
|
def __init__(self, label: str) -> None: ...
|
|
def import_models(self) -> None: ...
|
|
|
|
|
|
class ModelState:
|
|
def __eq__(self, other: ModelState) -> bool: ...
|
|
def __init__(
|
|
self,
|
|
app_label: str,
|
|
name: str,
|
|
fields: Any,
|
|
options: Any = ...,
|
|
bases: Any = ...,
|
|
managers: Any = ...
|
|
) -> None: ...
|
|
def __repr__(self) -> str: ...
|
|
def clone(self) -> ModelState: ...
|
|
def construct_managers(self) -> Iterator[Any]: ...
|
|
@classmethod
|
|
def from_model(cls, model: Any, exclude_rels: bool = ...) -> ModelState: ...
|
|
def get_field_by_name(self, name: str) -> Field: ...
|
|
def get_index_by_name(self, name: str) -> Index: ...
|
|
@cached_property
|
|
def name_lower(self) -> str: ...
|
|
def render(self, apps: Apps): ... |