File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 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
55from django .core .exceptions import ObjectDoesNotExist , ValidationError
66from django .db .models .manager import BaseManager
77from django .db .models .options import Options
8- from django .utils .functional import classproperty
98
109_Self = TypeVar ("_Self" , bound = "Model" )
1110
@@ -16,20 +15,19 @@ class ModelState:
1615 adding : bool = ...
1716 fields_cache : ModelStateFieldsCacheDescriptor = ...
1817
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]
2025
2126class Model (metaclass = ModelBase ):
2227 class DoesNotExist (ObjectDoesNotExist ): ...
2328 class MultipleObjectsReturned (BaseMultipleObjectsReturned ): ...
2429 class Meta : ...
2530 _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 ]
3331 pk : Any = ...
3432 _state : ModelState
3533 def __init__ (self : _Self , * args : Any , ** kwargs : Any ) -> None : ...
You can’t perform that action at this time.
0 commit comments