mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 07:47:09 +08:00
create dummy classes for custom_manager_of_model usecase
This commit is contained in:
@@ -9,8 +9,9 @@ class BaseManager(QuerySet[_T, _T]):
|
||||
creation_counter: int = ...
|
||||
auto_created: bool = ...
|
||||
use_in_migrations: bool = ...
|
||||
model: Optional[Any] = ...
|
||||
name: Optional[Any] = ...
|
||||
name: str = ...
|
||||
model: Type[Model] = ...
|
||||
db: str
|
||||
def __init__(self) -> None: ...
|
||||
def deconstruct(self) -> Tuple[bool, str, None, Tuple, Dict[str, int]]: ...
|
||||
def check(self, **kwargs: Any) -> List[Any]: ...
|
||||
@@ -34,8 +35,4 @@ class ManagerDescriptor:
|
||||
def __get__(self, instance: Optional[Model], cls: Type[Model] = ...) -> Manager: ...
|
||||
|
||||
class EmptyManager(Manager):
|
||||
creation_counter: int
|
||||
name: None
|
||||
model: Optional[Type[Model]] = ...
|
||||
def __init__(self, model: Type[Model]) -> None: ...
|
||||
def get_queryset(self) -> QuerySet: ...
|
||||
|
||||
@@ -37,8 +37,6 @@ class Options(Generic[_M]):
|
||||
default_manager: Manager
|
||||
fields: ImmutableList
|
||||
local_concrete_fields: ImmutableList
|
||||
managers: ImmutableList
|
||||
managers_map: Dict[str, Manager]
|
||||
related_objects: ImmutableList
|
||||
FORWARD_PROPERTIES: Any = ...
|
||||
REVERSE_PROPERTIES: Any = ...
|
||||
@@ -106,6 +104,10 @@ class Options(Generic[_M]):
|
||||
def many_to_many(self) -> List[ManyToManyField]: ...
|
||||
@property
|
||||
def fields_map(self) -> Dict[str, Union[Field, ForeignObjectRel]]: ...
|
||||
@property
|
||||
def managers(self) -> List[Manager]: ...
|
||||
@property
|
||||
def managers_map(self) -> Dict[str, Manager]: ...
|
||||
def get_field(self, field_name: Union[Callable, str]) -> Field: ...
|
||||
def get_base_chain(self, model: Type[Model]) -> List[Type[Model]]: ...
|
||||
def get_parent_list(self) -> List[Type[Model]]: ...
|
||||
|
||||
Reference in New Issue
Block a user