mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 16:57:12 +08:00
Improve types for @require_http_methods (#1075)
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
from typing import Any, Callable, List, Optional, TypeVar
|
from typing import Any, Callable, Container, Optional, TypeVar
|
||||||
|
|
||||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||||
|
|
||||||
conditional_page: Callable[[_F], _F] = ...
|
conditional_page: Callable[[_F], _F] = ...
|
||||||
|
|
||||||
def require_http_methods(request_method_list: List[str]) -> Callable[[_F], _F]: ...
|
def require_http_methods(request_method_list: Container[str]) -> Callable[[_F], _F]: ...
|
||||||
|
|
||||||
require_GET: Callable[[_F], _F] = ...
|
require_GET: Callable[[_F], _F] = ...
|
||||||
require_POST: Callable[[_F], _F] = ...
|
require_POST: Callable[[_F], _F] = ...
|
||||||
|
|||||||
Reference in New Issue
Block a user