third iteration of stubs

This commit is contained in:
Maxim Kurnikov committed 2018-08-11 00:19:50 +03:00
1 parent fa718b8e55
commit c6bceb19f4
216 files changed
+16306 -3006

No files matched your search

+5 -5
View File
@@ -6,12 +6,12 @@ from django.utils.deprecation import MiddlewareMixin
class UpdateCacheMiddleware(MiddlewareMixin):
cache_timeout: float = ...
cache_timeout: Union[float, int] = ...
key_prefix: str = ...
cache_alias: str = ...
cache: Union[
django.core.cache.backends.base.BaseCache,
django.core.cache.DefaultCacheProxy,
django.core.cache.backends.base.BaseCache,
] = ...
get_response: Optional[Callable] = ...
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
@@ -23,8 +23,8 @@ class FetchFromCacheMiddleware(MiddlewareMixin):
key_prefix: str = ...
cache_alias: str = ...
cache: Union[
django.core.cache.backends.base.BaseCache,
django.core.cache.DefaultCacheProxy,
django.core.cache.backends.base.BaseCache,
] = ...
get_response: Optional[Callable] = ...
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
@@ -36,11 +36,11 @@ class CacheMiddleware(UpdateCacheMiddleware, FetchFromCacheMiddleware):
get_response: None = ...
key_prefix: str = ...
cache_alias: str = ...
cache_timeout: float = ...
cache_timeout: Union[float, int] = ...
cache: django.core.cache.backends.locmem.LocMemCache = ...
def __init__(
self,
get_response: None = ...,
cache_timeout: Optional[float] = ...,
cache_timeout: Optional[Union[float, int]] = ...,
**kwargs: Any
) -> None: ...
+17 -3
View File
@@ -1,7 +1,11 @@
from typing import Any, Callable, Dict, Optional, Tuple
from typing import Any, Callable, Dict, Optional, Tuple, Type, Union
from django.contrib.sitemaps import Sitemap
from django.core.exceptions import PermissionDenied, SuspiciousOperation
from django.http.multipartparser import MultiPartParserError
from django.http.request import HttpRequest
from django.http.response import HttpResponseBase, HttpResponseForbidden
from django.http.response import (Http404, HttpResponseBase,
HttpResponseForbidden)
from django.utils.deprecation import MiddlewareMixin
logger: Any
@@ -27,7 +31,17 @@ class CsrfViewMiddleware(MiddlewareMixin):
request: HttpRequest,
callback: Callable,
callback_args: Tuple,
callback_kwargs: Dict[str, Any],
callback_kwargs: Union[
Dict[str, Dict[str, Sitemap]],
Dict[str, Dict[str, str]],
Dict[str, None],
Dict[str, Union[Dict[str, Type[Sitemap]], str]],
Dict[str, Union[int, str]],
Dict[str, PermissionDenied],
Dict[str, SuspiciousOperation],
Dict[str, MultiPartParserError],
Dict[str, Http404],
],
) -> Optional[HttpResponseForbidden]: ...
def process_response(
self, request: HttpRequest, response: HttpResponseBase