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

@@ -9,9 +9,7 @@ from django.http.response import HttpResponse, HttpResponseRedirect
from django.template.response import TemplateResponse
from django.utils.datastructures import MultiValueDict
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
from django.views.generic.detail import (BaseDetailView, SingleObjectMixin,
SingleObjectTemplateResponseMixin)
from django.views.generic.detail import BaseDetailView, SingleObjectMixin, SingleObjectTemplateResponseMixin
class FormMixin(ContextMixin):
initial: Any = ...
@@ -22,34 +20,24 @@ class FormMixin(ContextMixin):
def get_prefix(self) -> None: ...
def get_form_class(self) -> Type[Form]: ...
def get_form(self, form_class: None = ...) -> BaseForm: ...
def get_form_kwargs(
self
) -> Dict[str, Optional[Union[Dict[str, str], MultiValueDict]]]: ...
def get_form_kwargs(self) -> Dict[str, Optional[Union[Dict[str, str], MultiValueDict]]]: ...
def get_success_url(self) -> str: ...
def form_valid(self, form: BaseForm) -> HttpResponseRedirect: ...
def form_invalid(self, form: Form) -> TemplateResponse: ...
def get_context_data(
self, **kwargs: Any
) -> Dict[str, Union[Model, BaseForm, TemplateResponseMixin]]: ...
def get_context_data(self, **kwargs: Any) -> Dict[str, Union[Model, BaseForm, TemplateResponseMixin]]: ...
class ModelFormMixin(FormMixin, SingleObjectMixin):
request: django.core.handlers.wsgi.WSGIRequest
fields: Any = ...
def get_form_class(self) -> Type[ModelForm]: ...
def get_form_kwargs(
self
) -> Dict[str, Optional[Union[Dict[Any, Any], Model, MultiValueDict]]]: ...
def get_form_kwargs(self) -> Dict[str, Optional[Union[Dict[Any, Any], Model, MultiValueDict]]]: ...
def get_success_url(self) -> str: ...
object: Any = ...
def form_valid(self, form: ModelForm) -> HttpResponseRedirect: ...
class ProcessFormView(View):
def get(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> TemplateResponse: ...
def post(
self, request: HttpRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
def post(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
def put(self, *args: Any, **kwargs: Any): ...
class BaseFormView(FormMixin, ProcessFormView): ...
@@ -57,24 +45,16 @@ class FormView(TemplateResponseMixin, BaseFormView): ...
class BaseCreateView(ModelFormMixin, ProcessFormView):
object: Any = ...
def get(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> TemplateResponse: ...
def post(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
class CreateView(SingleObjectTemplateResponseMixin, BaseCreateView):
template_name_suffix: str = ...
class BaseUpdateView(ModelFormMixin, ProcessFormView):
object: Any = ...
def get(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> TemplateResponse: ...
def post(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
class UpdateView(SingleObjectTemplateResponseMixin, BaseUpdateView):
template_name_suffix: str = ...
@@ -82,12 +62,8 @@ class UpdateView(SingleObjectTemplateResponseMixin, BaseUpdateView):
class DeletionMixin:
success_url: Any = ...
object: Any = ...
def delete(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseRedirect: ...
def post(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> HttpResponseRedirect: ...
def delete(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
def get_success_url(self) -> str: ...
class BaseDeleteView(DeletionMixin, BaseDetailView): ...