File tree 1 file changed +7
-9
lines changed
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ from django.core.exceptions import MultipleObjectsReturned as BaseMultipleObject
5
5
from django .core .exceptions import ObjectDoesNotExist , ValidationError
6
6
from django .db .models .manager import BaseManager
7
7
from django .db .models .options import Options
8
- from django .utils .functional import classproperty
9
8
10
9
_Self = TypeVar ("_Self" , bound = "Model" )
11
10
@@ -16,20 +15,19 @@ class ModelState:
16
15
adding : bool = ...
17
16
fields_cache : ModelStateFieldsCacheDescriptor = ...
18
17
19
- class ModelBase (type ): ...
18
+ class ModelBase (type ):
19
+ @property
20
+ def objects (cls : Type [_Self ]) -> BaseManager [_Self ]: ... # type: ignore[misc]
21
+ @property
22
+ def _default_manager (cls : Type [_Self ]) -> BaseManager [_Self ]: ... # type: ignore[misc]
23
+ @property
24
+ def _base_manager (cls : Type [_Self ]) -> BaseManager [_Self ]: ... # type: ignore[misc]
20
25
21
26
class Model (metaclass = ModelBase ):
22
27
class DoesNotExist (ObjectDoesNotExist ): ...
23
28
class MultipleObjectsReturned (BaseMultipleObjectsReturned ): ...
24
29
class Meta : ...
25
30
_meta : Options [Any ]
26
- @classproperty
27
- @classmethod
28
- def _default_manager (cls : Type [_Self ]) -> BaseManager [_Self ]: ...
29
- @classproperty
30
- @classmethod
31
- def _base_manager (cls : Type [_Self ]) -> BaseManager [_Self ]: ...
32
- objects : BaseManager [Any ]
33
31
pk : Any = ...
34
32
_state : ModelState
35
33
def __init__ (self : _Self , * args : Any , ** kwargs : Any ) -> None : ...
You can’t perform that action at this time.
0 commit comments