mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 13:04:47 +08:00
revert meta: Options annotation (#99)
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
from typing import Any, Dict, List, Optional, Set, Tuple, TypeVar, Union, ClassVar, Sequence, Generic
|
from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, TypeVar, Union
|
||||||
|
|
||||||
from django.db.models.manager import Manager
|
from django.db.models.manager import Manager
|
||||||
from django.db.models.options import Options
|
|
||||||
|
|
||||||
class ModelBase(type): ...
|
class ModelBase(type): ...
|
||||||
|
|
||||||
@@ -11,7 +10,7 @@ class Model(metaclass=ModelBase):
|
|||||||
class DoesNotExist(Exception): ...
|
class DoesNotExist(Exception): ...
|
||||||
class MultipleObjectsReturned(Exception): ...
|
class MultipleObjectsReturned(Exception): ...
|
||||||
class Meta: ...
|
class Meta: ...
|
||||||
_meta: Options
|
_meta: Any
|
||||||
_default_manager: Manager[Model]
|
_default_manager: Manager[Model]
|
||||||
pk: Any = ...
|
pk: Any = ...
|
||||||
def __init__(self: _Self, *args, **kwargs) -> None: ...
|
def __init__(self: _Self, *args, **kwargs) -> None: ...
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ def SET_DEFAULT(collector, field, sub_objs, using): ...
|
|||||||
def DO_NOTHING(collector, field, sub_objs, using): ...
|
def DO_NOTHING(collector, field, sub_objs, using): ...
|
||||||
def PROTECT(collector, field, sub_objs, using): ...
|
def PROTECT(collector, field, sub_objs, using): ...
|
||||||
def SET(value: Any) -> Callable: ...
|
def SET(value: Any) -> Callable: ...
|
||||||
|
|
||||||
def get_candidate_relations_to_delete(opts: Options) -> Iterable[Field]: ...
|
def get_candidate_relations_to_delete(opts: Options) -> Iterable[Field]: ...
|
||||||
|
|
||||||
class ProtectedError(IntegrityError): ...
|
class ProtectedError(IntegrityError): ...
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ from django.utils.deprecation import MiddlewareMixin
|
|||||||
|
|
||||||
class classonlymethod(classmethod): ...
|
class classonlymethod(classmethod): ...
|
||||||
|
|
||||||
def method_decorator(
|
def method_decorator(decorator: Union[Callable, Iterable[Callable]], name: str = ...) -> Callable: ...
|
||||||
decorator: Union[Callable, Iterable[Callable]], name: str = ...
|
|
||||||
) -> Callable: ...
|
|
||||||
def decorator_from_middleware_with_args(middleware_class: Type[MiddlewareMixin]) -> Callable: ...
|
def decorator_from_middleware_with_args(middleware_class: Type[MiddlewareMixin]) -> Callable: ...
|
||||||
def decorator_from_middleware(middleware_class: Type[MiddlewareMixin]) -> Callable: ...
|
def decorator_from_middleware(middleware_class: Type[MiddlewareMixin]) -> Callable: ...
|
||||||
def available_attrs(fn: Any): ...
|
def available_attrs(fn: Any): ...
|
||||||
|
|||||||
Reference in New Issue
Block a user