Skip to content

Commit ae96628

Browse files
committed
Allow any iterable to be passed to method_decorator
From reading the source of Django 2.1.9, this seems to be what's allowed there. Fixes https://github.com/mkurnikov/django-stubs/issues/78.
1 parent 629ba95 commit ae96628

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django-stubs/utils/decorators.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from typing import Any, Callable, Optional, Set, Tuple, Type, Union
1+
from typing import Any, Callable, Iterable, Optional, Type, Union
22

33
from django.utils.deprecation import MiddlewareMixin
44

55
class classonlymethod(classmethod): ...
66

77
def method_decorator(
8-
decorator: Union[Callable, Set[Callable], Tuple[Callable, Callable]], name: str = ...
8+
decorator: Union[Callable, Iterable[Callable]], name: str = ...
99
) -> Callable: ...
1010
def decorator_from_middleware_with_args(middleware_class: Type[MiddlewareMixin]) -> Callable: ...
1111
def decorator_from_middleware(middleware_class: Type[MiddlewareMixin]) -> Callable: ...

0 commit comments

Comments
 (0)