mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-01-28 05:42:11 +08:00
42 lines
1.3 KiB
Python
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: ... |