run black over stubs, add checking to travis

This commit is contained in:
Maxim Kurnikov
2018-12-03 18:52:44 +03:00
parent d5bc7d4ab2
commit cf6119bf9b
420 changed files with 2295 additions and 8384 deletions

View File

@@ -6,8 +6,7 @@ from django.contrib.sites.models import Site
from django.core.handlers.wsgi import WSGIRequest
from django.core.paginator import Page, Paginator
from django.http.request import HttpRequest
from django.http.response import (HttpResponse, HttpResponseNotAllowed,
HttpResponseRedirect)
from django.http.response import HttpResponse, HttpResponseNotAllowed, HttpResponseRedirect
from django.template.response import TemplateResponse
from django.views.generic.list import ListView
@@ -25,15 +24,9 @@ class View:
args: Any = ...
kwargs: Any = ...
def as_view(cls, **initkwargs: Any) -> Callable: ...
def dispatch(
self, request: HttpRequest, *args: Any, **kwargs: Any
) -> Union[HttpResponse, View]: ...
def http_method_not_allowed(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseNotAllowed: ...
def options(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def dispatch(self, request: HttpRequest, *args: Any, **kwargs: Any) -> Union[HttpResponse, View]: ...
def http_method_not_allowed(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseNotAllowed: ...
def options(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
class TemplateResponseMixin:
template_name: Any = ...
@@ -45,13 +38,8 @@ class TemplateResponseMixin:
context: Union[
Dict[str, Any],
Dict[str, Optional[Union[List[Dict[str, str]], bool, ListView]]],
Dict[
str,
Union[List[Dict[str, str]], bool, Page, Paginator, ListView],
],
Dict[
str, Union[AuthenticationForm, Site, TemplateResponseMixin, str]
],
Dict[str, Union[List[Dict[str, str]], bool, Page, Paginator, ListView]],
Dict[str, Union[AuthenticationForm, Site, TemplateResponseMixin, str]],
MagicMock,
],
**response_kwargs: Any
@@ -67,9 +55,7 @@ class TemplateView(TemplateResponseMixin, ContextMixin, View):
request: django.core.handlers.wsgi.WSGIRequest
template_engine: str
template_name: str
def get(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> TemplateResponse: ...
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
class RedirectView(View):
args: Tuple
@@ -80,24 +66,10 @@ class RedirectView(View):
pattern_name: str = ...
query_string: bool = ...
def get_redirect_url(self, *args: Any, **kwargs: Any) -> Optional[str]: ...
def get(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def head(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def post(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseRedirect: ...
def options(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseRedirect: ...
def delete(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseRedirect: ...
def put(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseRedirect: ...
def patch(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseRedirect: ...
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
def head(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
def options(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
def delete(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
def put(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
def patch(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...