Improve types for @require_http_methods (#1075)

This commit is contained in:
Adam Johnson
2022-07-26 18:47:05 +01:00
committed by GitHub
parent 56f9300d0d
commit efc2d04ead

View File

@@ -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])
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_POST: Callable[[_F], _F] = ...