Skip to content

Commit 373d8e6

Browse files
committed
Type non-parametrised views.decorators.http
Fixes `error: Untyped decorator makes function "view" untyped`
1 parent 86642e3 commit 373d8e6

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
from typing import Any, Callable, List, Optional, TypeVar
22

3-
conditional_page: Any
4-
5-
def require_http_methods(request_method_list: List[str]) -> Callable: ...
6-
7-
require_GET: Any
8-
require_POST: Any
9-
require_safe: Any
10-
113
_F = TypeVar("_F", bound=Callable[..., Any])
124

5+
def conditional_page(_F) -> _F: ...
6+
def require_http_methods(request_method_list: List[str]) -> Callable: ...
7+
def require_GET(_F) -> _F: ...
8+
def require_POST(_F) -> _F: ...
9+
def require_safe(_F) -> _F: ...
1310
def condition(etag_func: Optional[Callable] = ..., last_modified_func: Optional[Callable] = ...) -> Callable: ...
1411
def etag(etag_func: Callable[..., Any]) -> Callable[[_F], _F]: ...
1512
def last_modified(last_modified_func: Callable[..., Any]) -> Callable[[_F], _F]: ...

0 commit comments

Comments
 (0)