mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 22:11:54 +08:00
Add missing queryset annotations (#644)
This commit is contained in:
@@ -44,7 +44,7 @@ class _BaseQuerySet(Generic[_T], Sized):
|
||||
def as_manager(cls) -> Manager[Any]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __class_getitem__(cls, item: Type[_T]): ...
|
||||
def __class_getitem__(cls: Type[_QS], item: Type[_T]) -> Type[_QS]: ...
|
||||
def __getstate__(self) -> Dict[str, Any]: ...
|
||||
# Technically, the other QuerySet must be of the same type _T, but _T is covariant
|
||||
def __and__(self: _QS, other: _BaseQuerySet[_T]) -> _QS: ...
|
||||
@@ -207,7 +207,7 @@ class Prefetch(object):
|
||||
def add_prefix(self, prefix: str) -> None: ...
|
||||
def get_current_prefetch_to(self, level: int) -> str: ...
|
||||
def get_current_to_attr(self, level: int) -> Tuple[str, str]: ...
|
||||
def get_current_queryset(self, level) -> Optional[QuerySet]: ...
|
||||
def get_current_queryset(self, level: int) -> Optional[QuerySet]: ...
|
||||
|
||||
def prefetch_related_objects(model_instances: Iterable[_T], *related_lookups: Union[str, Prefetch]) -> None: ...
|
||||
def get_prefetcher(instance: Model, through_attr: str, to_attr: str) -> Tuple[Any, Any, bool, bool]: ...
|
||||
|
||||
Reference in New Issue
Block a user