mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 07:47:09 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -4,28 +4,15 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from django.contrib.auth.base_user import AbstractBaseUser
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
def get_default_password_validators() -> Union[
|
||||
List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]
|
||||
]: ...
|
||||
def get_default_password_validators() -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
|
||||
def get_password_validators(
|
||||
validator_config: List[Dict[str, Union[Dict[str, int], str]]]
|
||||
) -> Union[
|
||||
List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]
|
||||
]: ...
|
||||
) -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
|
||||
def validate_password(
|
||||
password: str,
|
||||
user: Optional[AbstractBaseUser] = ...,
|
||||
password_validators: Optional[List[Any]] = ...,
|
||||
password: str, user: Optional[AbstractBaseUser] = ..., password_validators: Optional[List[Any]] = ...
|
||||
) -> None: ...
|
||||
def password_changed(
|
||||
password: str,
|
||||
user: Optional[AbstractBaseUser] = ...,
|
||||
password_validators: None = ...,
|
||||
) -> None: ...
|
||||
def password_validators_help_texts(
|
||||
password_validators: Optional[List[Any]] = ...
|
||||
) -> List[str]: ...
|
||||
def password_changed(password: str, user: Optional[AbstractBaseUser] = ..., password_validators: None = ...) -> None: ...
|
||||
def password_validators_help_texts(password_validators: Optional[List[Any]] = ...) -> List[str]: ...
|
||||
|
||||
password_validators_help_text_html: Any
|
||||
|
||||
@@ -40,9 +27,7 @@ class UserAttributeSimilarityValidator:
|
||||
user_attributes: Tuple[str, str, str, str] = ...
|
||||
max_similarity: float = ...
|
||||
def __init__(
|
||||
self,
|
||||
user_attributes: Union[List[str], Tuple[str, str, str, str]] = ...,
|
||||
max_similarity: float = ...,
|
||||
self, user_attributes: Union[List[str], Tuple[str, str, str, str]] = ..., max_similarity: float = ...
|
||||
) -> None: ...
|
||||
def validate(self, password: str, user: Optional[User] = ...) -> None: ...
|
||||
def get_help_text(self) -> str: ...
|
||||
@@ -50,14 +35,10 @@ class UserAttributeSimilarityValidator:
|
||||
class CommonPasswordValidator:
|
||||
DEFAULT_PASSWORD_LIST_PATH: Any = ...
|
||||
passwords: Set[str] = ...
|
||||
def __init__(
|
||||
self, password_list_path: Union[PosixPath, str] = ...
|
||||
) -> None: ...
|
||||
def __init__(self, password_list_path: Union[PosixPath, str] = ...) -> None: ...
|
||||
def validate(self, password: str, user: None = ...) -> None: ...
|
||||
def get_help_text(self) -> str: ...
|
||||
|
||||
class NumericPasswordValidator:
|
||||
def validate(
|
||||
self, password: str, user: Optional[AbstractBaseUser] = ...
|
||||
) -> None: ...
|
||||
def validate(self, password: str, user: Optional[AbstractBaseUser] = ...) -> None: ...
|
||||
def get_help_text(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user