mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-21 03:11:17 +08:00
make pep561 compliant
This commit is contained in:
7
django-stubs/views/decorators/cache.pyi
Normal file
7
django-stubs/views/decorators/cache.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Callable
|
||||
|
||||
|
||||
def cache_page(timeout: float, *, cache = ..., key_prefix = ...) -> Callable: ...
|
||||
|
||||
|
||||
def never_cache(view_func: Callable) -> Callable: ...
|
||||
25
django-stubs/views/decorators/csrf.pyi
Normal file
25
django-stubs/views/decorators/csrf.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from django.http.request import HttpRequest
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
Tuple,
|
||||
)
|
||||
|
||||
|
||||
def csrf_exempt(view_func: Callable) -> Callable: ...
|
||||
|
||||
|
||||
class _EnsureCsrfCookie:
|
||||
def _reject(self, request: HttpRequest, reason: str) -> None: ...
|
||||
def process_view(
|
||||
self,
|
||||
request: HttpRequest,
|
||||
callback: Callable,
|
||||
callback_args: Tuple,
|
||||
callback_kwargs: Dict[Any, Any]
|
||||
) -> None: ...
|
||||
|
||||
|
||||
class _EnsureCsrfToken:
|
||||
def _reject(self, request: HttpRequest, reason: str) -> None: ...
|
||||
7
django-stubs/views/decorators/debug.pyi
Normal file
7
django-stubs/views/decorators/debug.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Callable
|
||||
|
||||
|
||||
def sensitive_post_parameters(*parameters) -> Callable: ...
|
||||
|
||||
|
||||
def sensitive_variables(*variables) -> Callable: ...
|
||||
13
django-stubs/views/decorators/http.pyi
Normal file
13
django-stubs/views/decorators/http.pyi
Normal file
@@ -0,0 +1,13 @@
|
||||
from typing import (
|
||||
Callable,
|
||||
List,
|
||||
)
|
||||
|
||||
|
||||
def condition(etag_func: Callable = ..., last_modified_func: None = ...) -> Callable: ...
|
||||
|
||||
|
||||
def etag(etag_func: Callable) -> Callable: ...
|
||||
|
||||
|
||||
def require_http_methods(request_method_list: List[str]) -> Callable: ...
|
||||
7
django-stubs/views/decorators/vary.pyi
Normal file
7
django-stubs/views/decorators/vary.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Callable
|
||||
|
||||
|
||||
def vary_on_cookie(func: Callable) -> Callable: ...
|
||||
|
||||
|
||||
def vary_on_headers(*headers) -> Callable: ...
|
||||
Reference in New Issue
Block a user