Files
django-stubs/django/db/models/manager.pyi
Maxim Kurnikov 89bb6eac75 improved version
2018-07-29 20:06:41 +03:00

42 lines
1.3 KiB
Python

from django.contrib.admin.models import LogEntry
from django.contrib.auth.models import Permission
from django.db.models.base import Model
from django.db.models.query import QuerySet
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Tuple,
Type,
Union,
)
class BaseManager:
def __eq__(self, other: Optional[Manager]) -> bool: ...
def __init__(self) -> None: ...
@staticmethod
def __new__(cls: Type[Manager], *args, **kwargs) -> Manager: ...
@classmethod
def _get_queryset_methods(cls, queryset_class: Type[QuerySet]) -> Dict[str, Callable]: ...
def _set_creation_counter(self) -> None: ...
def all(self) -> QuerySet: ...
def check(self, **kwargs) -> List[Any]: ...
def contribute_to_class(self, model: Type[Model], name: str) -> None: ...
@property
def db(self) -> str: ...
def db_manager(
self,
using: Optional[str] = ...,
hints: Optional[Union[Dict[str, Model], Dict[str, LogEntry], Dict[str, Permission]]] = ...
) -> Manager: ...
def deconstruct(
self
) -> Union[Tuple[bool, str, None, Tuple[str, str, int, int], Dict[Any, Any]], Tuple[bool, str, None, Tuple, Dict[Any, Any]]]: ...
def get_queryset(self) -> QuerySet: ...
class EmptyManager:
def __init__(self, model: Type[Model]) -> None: ...