diff --git a/django-stubs/db/models/base.pyi b/django-stubs/db/models/base.pyi index 1a14ad5..c4be2b5 100644 --- a/django-stubs/db/models/base.pyi +++ b/django-stubs/db/models/base.pyi @@ -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.options import Options class ModelBase(type): ... @@ -11,7 +10,7 @@ class Model(metaclass=ModelBase): class DoesNotExist(Exception): ... class MultipleObjectsReturned(Exception): ... class Meta: ... - _meta: Options + _meta: Any _default_manager: Manager[Model] pk: Any = ... def __init__(self: _Self, *args, **kwargs) -> None: ... diff --git a/django-stubs/db/models/deletion.pyi b/django-stubs/db/models/deletion.pyi index fa44344..dd162dd 100644 --- a/django-stubs/db/models/deletion.pyi +++ b/django-stubs/db/models/deletion.pyi @@ -10,7 +10,6 @@ def SET_DEFAULT(collector, field, sub_objs, using): ... def DO_NOTHING(collector, field, sub_objs, using): ... def PROTECT(collector, field, sub_objs, using): ... def SET(value: Any) -> Callable: ... - def get_candidate_relations_to_delete(opts: Options) -> Iterable[Field]: ... class ProtectedError(IntegrityError): ... diff --git a/django-stubs/utils/decorators.pyi b/django-stubs/utils/decorators.pyi index 397beb8..578049e 100644 --- a/django-stubs/utils/decorators.pyi +++ b/django-stubs/utils/decorators.pyi @@ -4,9 +4,7 @@ from django.utils.deprecation import MiddlewareMixin class classonlymethod(classmethod): ... -def method_decorator( - decorator: Union[Callable, Iterable[Callable]], name: str = ... -) -> Callable: ... +def method_decorator(decorator: Union[Callable, Iterable[Callable]], name: str = ...) -> Callable: ... def decorator_from_middleware_with_args(middleware_class: Type[MiddlewareMixin]) -> Callable: ... def decorator_from_middleware(middleware_class: Type[MiddlewareMixin]) -> Callable: ... def available_attrs(fn: Any): ...