mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
initial commit
This commit is contained in:
35
django/db/migrations/state.pyi
Normal file
35
django/db/migrations/state.pyi
Normal file
@@ -0,0 +1,35 @@
|
||||
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): ...
|
||||
Reference in New Issue
Block a user