Add django.db.models.base.model_unpickle (#1209)

This commit is contained in:
Adam Johnson
2022-10-27 19:30:44 +01:00
committed by GitHub
parent efebe22397
commit 85ae4bb704

View File

@@ -1,4 +1,4 @@
from typing import Any, Collection, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Type, TypeVar
from typing import Any, Collection, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Type, TypeVar, Union
from django.core.checks.messages import CheckMessage
from django.core.exceptions import MultipleObjectsReturned as BaseMultipleObjectsReturned
@@ -65,3 +65,5 @@ class Model(metaclass=ModelBase):
@classmethod
def check(cls, **kwargs: Any) -> List[CheckMessage]: ...
def __getstate__(self) -> dict: ...
def model_unpickle(model_id: Union[Tuple[str, str], type[Model]]) -> Model: ...