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

@@ -23,9 +23,7 @@ class RegexValidator:
flags: Optional[RegexFlag] = ...,
) -> None: ...
def __call__(self, value: Optional[Union[float, str]]) -> None: ...
def __eq__(
self, other: Union[ProhibitNullCharactersValidator, RegexValidator]
) -> bool: ...
def __eq__(self, other: Union[ProhibitNullCharactersValidator, RegexValidator]) -> bool: ...
class URLValidator(RegexValidator):
ul: str = ...
@@ -38,9 +36,7 @@ class URLValidator(RegexValidator):
regex: django.utils.functional.SimpleLazyObject = ...
message: Any = ...
schemes: Any = ...
def __init__(
self, schemes: Optional[List[str]] = ..., **kwargs: Any
) -> None: ...
def __init__(self, schemes: Optional[List[str]] = ..., **kwargs: Any) -> None: ...
def __call__(self, value: str) -> None: ...
integer_validator: Any
@@ -54,12 +50,7 @@ class EmailValidator:
domain_regex: Any = ...
literal_regex: Any = ...
domain_whitelist: Any = ...
def __init__(
self,
message: Optional[str] = ...,
code: Optional[str] = ...,
whitelist: Optional[List[str]] = ...,
) -> None: ...
def __init__(self, message: Optional[str] = ..., code: Optional[str] = ..., whitelist: Optional[List[str]] = ...) -> None: ...
def __call__(self, value: Optional[str]) -> None: ...
def validate_domain_part(self, domain_part: str) -> bool: ...
def __eq__(self, other: EmailValidator) -> bool: ...
@@ -77,12 +68,7 @@ def validate_ipv46_address(value: str) -> None: ...
ip_address_validator_map: Any
def ip_address_validators(protocol: str, unpack_ipv4: bool) -> Any: ...
def int_list_validator(
sep: str = ...,
message: None = ...,
code: str = ...,
allow_negative: bool = ...,
) -> RegexValidator: ...
def int_list_validator(sep: str = ..., message: None = ..., code: str = ..., allow_negative: bool = ...) -> RegexValidator: ...
validate_comma_separated_integer_list: Any
@@ -90,39 +76,23 @@ class BaseValidator:
message: Any = ...
code: str = ...
limit_value: bool = ...
def __init__(
self,
limit_value: Optional[Union[datetime, Decimal, float, str]],
message: Optional[str] = ...,
) -> None: ...
def __call__(
self, value: Union[bytes, datetime, Decimal, float, str]
) -> None: ...
def __init__(self, limit_value: Optional[Union[datetime, Decimal, float, str]], message: Optional[str] = ...) -> None: ...
def __call__(self, value: Union[bytes, datetime, Decimal, float, str]) -> None: ...
def __eq__(self, other: BaseValidator) -> bool: ...
def compare(self, a: bool, b: bool) -> bool: ...
def clean(
self, x: Union[datetime, Decimal, float]
) -> Union[datetime, Decimal, float]: ...
def clean(self, x: Union[datetime, Decimal, float]) -> Union[datetime, Decimal, float]: ...
class MaxValueValidator(BaseValidator):
limit_value: decimal.Decimal
message: Any = ...
code: str = ...
def compare(
self,
a: Union[datetime, Decimal, float],
b: Union[datetime, Decimal, float],
) -> bool: ...
def compare(self, a: Union[datetime, Decimal, float], b: Union[datetime, Decimal, float]) -> bool: ...
class MinValueValidator(BaseValidator):
limit_value: int
message: Any = ...
code: str = ...
def compare(
self,
a: Union[datetime, Decimal, float],
b: Union[datetime, Decimal, float],
) -> bool: ...
def compare(self, a: Union[datetime, Decimal, float], b: Union[datetime, Decimal, float]) -> bool: ...
class MinLengthValidator(BaseValidator):
limit_value: int
@@ -142,25 +112,16 @@ class DecimalValidator:
messages: Any = ...
max_digits: int = ...
decimal_places: int = ...
def __init__(
self,
max_digits: Optional[Union[int, str]],
decimal_places: Optional[Union[int, str]],
) -> None: ...
def __init__(self, max_digits: Optional[Union[int, str]], decimal_places: Optional[Union[int, str]]) -> None: ...
def __call__(self, value: Decimal) -> None: ...
def __eq__(
self, other: Union[DecimalValidator, MinValueValidator]
) -> bool: ...
def __eq__(self, other: Union[DecimalValidator, MinValueValidator]) -> bool: ...
class FileExtensionValidator:
message: Any = ...
code: str = ...
allowed_extensions: List[str] = ...
def __init__(
self,
allowed_extensions: Optional[List[str]] = ...,
message: Optional[str] = ...,
code: Optional[str] = ...,
self, allowed_extensions: Optional[List[str]] = ..., message: Optional[str] = ..., code: Optional[str] = ...
) -> None: ...
def __call__(self, value: File) -> None: ...
def __eq__(self, other: FileExtensionValidator) -> bool: ...
@@ -171,12 +132,6 @@ def validate_image_file_extension(value: File) -> None: ...
class ProhibitNullCharactersValidator:
message: Any = ...
code: str = ...
def __init__(
self, message: Optional[str] = ..., code: Optional[str] = ...
) -> None: ...
def __call__(
self, value: Optional[Union[Dict[Any, Any], str, UUID]]
) -> None: ...
def __eq__(
self, other: Union[ProhibitNullCharactersValidator, RegexValidator]
) -> bool: ...
def __init__(self, message: Optional[str] = ..., code: Optional[str] = ...) -> None: ...
def __call__(self, value: Optional[Union[Dict[Any, Any], str, UUID]]) -> None: ...
def __eq__(self, other: Union[ProhibitNullCharactersValidator, RegexValidator]) -> bool: ...