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

@@ -1,8 +1,7 @@
from typing import Any, Dict, Optional, Set, Type, Union
from django.contrib.auth.base_user import AbstractBaseUser
from django.contrib.auth.forms import (AuthenticationForm, PasswordChangeForm,
PasswordResetForm, SetPasswordForm)
from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm, PasswordResetForm, SetPasswordForm
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.requests import RequestSite
@@ -27,45 +26,27 @@ class LoginView(SuccessURLAllowedHostsMixin, FormView):
template_name: str = ...
redirect_authenticated_user: bool = ...
extra_context: Any = ...
def dispatch(
self, request: HttpRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def dispatch(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
def get_success_url(self) -> str: ...
def get_redirect_url(self) -> str: ...
def get_form_class(self) -> Type[AuthenticationForm]: ...
def get_form_kwargs(
self
) -> Dict[
str, Optional[Union[Dict[str, str], HttpRequest, MultiValueDict]]
]: ...
def get_form_kwargs(self) -> Dict[str, Optional[Union[Dict[str, str], HttpRequest, MultiValueDict]]]: ...
def form_valid(self, form: AuthenticationForm) -> HttpResponseRedirect: ...
def get_context_data(
self, **kwargs: Any
) -> Dict[
str, Union[AuthenticationForm, LoginView, Site, RequestSite, str]
]: ...
def get_context_data(self, **kwargs: Any) -> Dict[str, Union[AuthenticationForm, LoginView, Site, RequestSite, str]]: ...
class LogoutView(SuccessURLAllowedHostsMixin, TemplateView):
next_page: Any = ...
redirect_field_name: Any = ...
template_name: str = ...
extra_context: Any = ...
def dispatch(
self, request: HttpRequest, *args: Any, **kwargs: Any
) -> HttpResponse: ...
def post(
self, request: WSGIRequest, *args: Any, **kwargs: Any
) -> TemplateResponse: ...
def dispatch(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
def get_next_page(self) -> Optional[str]: ...
def get_context_data(self, **kwargs: Any): ...
def logout_then_login(
request: HttpRequest, login_url: Optional[str] = ...
) -> HttpResponseRedirect: ...
def logout_then_login(request: HttpRequest, login_url: Optional[str] = ...) -> HttpResponseRedirect: ...
def redirect_to_login(
next: str,
login_url: Optional[str] = ...,
redirect_field_name: Optional[str] = ...,
next: str, login_url: Optional[str] = ..., redirect_field_name: Optional[str] = ...
) -> HttpResponseRedirect: ...
class PasswordContextMixin:
@@ -105,11 +86,7 @@ class PasswordResetConfirmView(PasswordContextMixin, FormView):
user: Any = ...
def dispatch(self, *args: Any, **kwargs: Any) -> HttpResponse: ...
def get_user(self, uidb64: str) -> Optional[AbstractBaseUser]: ...
def get_form_kwargs(
self
) -> Dict[
str, Optional[Union[Dict[Any, Any], AbstractBaseUser, MultiValueDict]]
]: ...
def get_form_kwargs(self) -> Dict[str, Optional[Union[Dict[Any, Any], AbstractBaseUser, MultiValueDict]]]: ...
def form_valid(self, form: SetPasswordForm) -> HttpResponseRedirect: ...
def get_context_data(self, **kwargs: Any): ...
@@ -124,9 +101,7 @@ class PasswordChangeView(PasswordContextMixin, FormView):
template_name: str = ...
title: Any = ...
def dispatch(self, *args: Any, **kwargs: Any) -> HttpResponse: ...
def get_form_kwargs(
self
) -> Dict[str, Optional[Union[Dict[Any, Any], User, MultiValueDict]]]: ...
def get_form_kwargs(self) -> Dict[str, Optional[Union[Dict[Any, Any], User, MultiValueDict]]]: ...
def form_valid(self, form: PasswordChangeForm) -> HttpResponseRedirect: ...
class PasswordChangeDoneView(PasswordContextMixin, TemplateView):