revert meta: Options annotation (#99)

This commit is contained in:
Maxim Kurnikov
2019-07-01 22:33:00 +03:00
committed by GitHub
parent 25165de80f
commit 90cab6c5bf
3 changed files with 3 additions and 7 deletions

View File

@@ -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: ...

View File

@@ -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): ...

View File

@@ -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): ...