better stubs

This commit is contained in:
Maxim Kurnikov
2018-08-05 03:13:19 +03:00
parent 4013fe4d03
commit fa718b8e55
380 changed files with 11805 additions and 8503 deletions

View File

@@ -1,13 +1,11 @@
# Stubs for django.views.decorators.cache (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Callable, Optional
from typing import Any, Optional
from typing import Callable
def cache_page(
timeout: float, *, cache: Optional[Any] = ..., key_prefix: Optional[Any] = ...
timeout: float,
*,
cache: Optional[Any] = ...,
key_prefix: Optional[Any] = ...
) -> Callable: ...
def cache_control(**kwargs: Any): ...
def cache_control(**kwargs: Any) -> Callable: ...
def never_cache(view_func: Callable) -> Callable: ...

View File

@@ -0,0 +1,6 @@
from typing import Any, Callable, Optional
def xframe_options_deny(view_func: Callable) -> Callable: ...
def xframe_options_sameorigin(view_func: Callable) -> Callable: ...
def xframe_options_exempt(view_func: Callable) -> Callable: ...

View File

@@ -1,30 +1,22 @@
# Stubs for django.views.decorators.csrf (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.middleware.csrf import CsrfViewMiddleware
from typing import Any
from django.http.request import HttpRequest
from typing import Any, Callable, Dict, Tuple
csrf_protect: Any
class _EnsureCsrfToken(CsrfViewMiddleware):
def _reject(self, request: HttpRequest, reason: str) -> None: ...
class _EnsureCsrfToken(CsrfViewMiddleware): ...
requires_csrf_token: Any
class _EnsureCsrfCookie(CsrfViewMiddleware):
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: ...
request: Any,
callback: Any,
callback_args: Any,
callback_kwargs: Any,
): ...
ensure_csrf_cookie: Any
def csrf_exempt(view_func: Callable) -> Callable: ...
def csrf_exempt(view_func: Any): ...

View File

@@ -1,10 +1,5 @@
# Stubs for django.views.decorators.debug (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Callable, Optional
from typing import Any
from typing import Callable
def sensitive_variables(*variables: Any) -> Callable: ...
def sensitive_post_parameters(*parameters: Any) -> Callable: ...

View File

@@ -1,10 +1,4 @@
# Stubs for django.views.decorators.http (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from typing import Callable, List
from typing import Any, Callable, List, Optional
conditional_page: Any
@@ -14,6 +8,9 @@ require_GET: Any
require_POST: Any
require_safe: Any
def condition(etag_func: Callable = ..., last_modified_func: None = ...) -> Callable: ...
def condition(
etag_func: Optional[Callable] = ...,
last_modified_func: Optional[Callable] = ...,
) -> Callable: ...
def etag(etag_func: Callable) -> Callable: ...
def last_modified(last_modified_func: Any): ...
def last_modified(last_modified_func: Callable) -> Callable: ...

View File

@@ -1,10 +1,5 @@
# Stubs for django.views.decorators.vary (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Callable, Optional
from typing import Any
from typing import Callable
def vary_on_headers(*headers: Any) -> Callable: ...
def vary_on_cookie(func: Callable) -> Callable: ...