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

@@ -8,33 +8,14 @@ UserModel: Any
class ModelBackend:
def authenticate(
self,
request: Any,
username: Optional[Union[int, str]] = ...,
password: Optional[str] = ...,
**kwargs: Any
self, request: Any, username: Optional[Union[int, str]] = ..., password: Optional[str] = ..., **kwargs: Any
) -> Optional[AbstractBaseUser]: ...
def user_can_authenticate(
self, user: Optional[AbstractBaseUser]
) -> bool: ...
def get_user_permissions(
self, user_obj: AbstractBaseUser, obj: None = ...
) -> Set[str]: ...
def get_group_permissions(
self, user_obj: AbstractBaseUser, obj: None = ...
) -> Set[str]: ...
def get_all_permissions(
self, user_obj: AbstractBaseUser, obj: Optional[str] = ...
) -> Set[str]: ...
def has_perm(
self,
user_obj: Union[AbstractBaseUser, AnonymousUser],
perm: str,
obj: Optional[str] = ...,
) -> bool: ...
def has_module_perms(
self, user_obj: Union[AbstractBaseUser, AnonymousUser], app_label: str
) -> bool: ...
def user_can_authenticate(self, user: Optional[AbstractBaseUser]) -> bool: ...
def get_user_permissions(self, user_obj: AbstractBaseUser, obj: None = ...) -> Set[str]: ...
def get_group_permissions(self, user_obj: AbstractBaseUser, obj: None = ...) -> Set[str]: ...
def get_all_permissions(self, user_obj: AbstractBaseUser, obj: Optional[str] = ...) -> Set[str]: ...
def has_perm(self, user_obj: Union[AbstractBaseUser, AnonymousUser], perm: str, obj: Optional[str] = ...) -> bool: ...
def has_module_perms(self, user_obj: Union[AbstractBaseUser, AnonymousUser], app_label: str) -> bool: ...
def get_user(self, user_id: int) -> AbstractBaseUser: ...
class AllowAllUsersModelBackend(ModelBackend):
@@ -42,9 +23,7 @@ class AllowAllUsersModelBackend(ModelBackend):
class RemoteUserBackend(ModelBackend):
create_unknown_user: bool = ...
def authenticate(
self, request: WSGIRequest, remote_user: Optional[str]
) -> Optional[User]: ...
def authenticate(self, request: WSGIRequest, remote_user: Optional[str]) -> Optional[User]: ...
def clean_username(self, username: str) -> str: ...
def configure_user(self, user: User) -> User: ...