|
1 | 1 | import datetime |
2 | | -from collections.abc import AsyncIterator, Callable, Collection, Iterable, Iterator, MutableMapping, Sequence |
| 2 | +from collections.abc import AsyncIterator, Callable, Collection, Iterable, Iterator, Mapping, Sequence |
3 | 3 | from typing import Any, Generic, NoReturn, TypeVar, overload |
4 | 4 |
|
5 | 5 | from django.db.models.base import Model |
@@ -63,20 +63,18 @@ class BaseManager(Generic[_T]): |
63 | 63 | ) -> list[_T]: ... |
64 | 64 | def bulk_update(self, objs: Iterable[_T], fields: Sequence[str], batch_size: int | None = ...) -> int: ... |
65 | 65 | async def abulk_update(self, objs: Iterable[_T], fields: Sequence[str], batch_size: int | None = ...) -> int: ... |
66 | | - def get_or_create(self, defaults: MutableMapping[str, Any] | None = ..., **kwargs: Any) -> tuple[_T, bool]: ... |
67 | | - async def aget_or_create( |
68 | | - self, defaults: MutableMapping[str, Any] | None = ..., **kwargs: Any |
69 | | - ) -> tuple[_T, bool]: ... |
| 66 | + def get_or_create(self, defaults: Mapping[str, Any] | None = ..., **kwargs: Any) -> tuple[_T, bool]: ... |
| 67 | + async def aget_or_create(self, defaults: Mapping[str, Any] | None = ..., **kwargs: Any) -> tuple[_T, bool]: ... |
70 | 68 | def update_or_create( |
71 | 69 | self, |
72 | | - defaults: MutableMapping[str, Any] | None = ..., |
73 | | - create_defaults: MutableMapping[str, Any] | None = ..., |
| 70 | + defaults: Mapping[str, Any] | None = ..., |
| 71 | + create_defaults: Mapping[str, Any] | None = ..., |
74 | 72 | **kwargs: Any, |
75 | 73 | ) -> tuple[_T, bool]: ... |
76 | 74 | async def aupdate_or_create( |
77 | 75 | self, |
78 | | - defaults: MutableMapping[str, Any] | None = ..., |
79 | | - create_defaults: MutableMapping[str, Any] | None = ..., |
| 76 | + defaults: Mapping[str, Any] | None = ..., |
| 77 | + create_defaults: Mapping[str, Any] | None = ..., |
80 | 78 | **kwargs: Any, |
81 | 79 | ) -> tuple[_T, bool]: ... |
82 | 80 | def earliest(self, *fields: str | OrderBy) -> _T: ... |
|
0 commit comments