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
@@ -4,6 +4,4 @@ from django.core.checks.messages import Error
E001: Any
def check_default_cache_is_configured(
app_configs: None, **kwargs: Any
) -> List[Error]: ...
def check_default_cache_is_configured(app_configs: None, **kwargs: Any) -> List[Error]: ...
@@ -1,4 +1,3 @@
from typing import Any, List, Optional
def check_database_backends(*args: Any, **kwargs: Any) -> List[Any]: ...
@@ -12,14 +12,7 @@ class CheckMessage:
hint: Any = ...
obj: Any = ...
id: Any = ...
def __init__(
self,
level: int,
msg: str,
hint: Optional[str] = ...,
obj: Any = ...,
id: Optional[str] = ...,
) -> None: ...
def __init__(self, level: int, msg: str, hint: Optional[str] = ..., obj: Any = ..., id: Optional[str] = ...) -> None: ...
def __eq__(self, other: Union[CheckMessage, str]) -> bool: ...
def is_serious(self, level: int = ...) -> bool: ...
def is_silenced(self) -> bool: ...
@@ -2,10 +2,5 @@ from typing import Any, List, Optional
from django.core.checks.messages import Warning
def check_all_models(
app_configs: None = ..., **kwargs: Any
) -> List[Warning]: ...
def check_lazy_references(
app_configs: None = ..., **kwargs: Any
) -> List[Any]: ...
def check_all_models(app_configs: None = ..., **kwargs: Any) -> List[Warning]: ...
def check_lazy_references(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
@@ -3,7 +3,6 @@ from typing import Any, Callable, List, Optional, Set, Union
from django.apps.config import AppConfig
from django.core.checks.messages import CheckMessage
class Tags:
admin: str = ...
caches: str = ...
@@ -19,25 +18,13 @@ class CheckRegistry:
registered_checks: Set[Callable] = ...
deployment_checks: Set[Callable] = ...
def __init__(self) -> None: ...
def register(
self,
check: Optional[Union[Callable, str]] = ...,
*tags: Any,
**kwargs: Any
) -> Callable: ...
def register(self, check: Optional[Union[Callable, str]] = ..., *tags: Any, **kwargs: Any) -> Callable: ...
def run_checks(
self,
app_configs: Optional[List[AppConfig]] = ...,
tags: Optional[List[str]] = ...,
include_deployment_checks: bool = ...,
self, app_configs: Optional[List[AppConfig]] = ..., tags: Optional[List[str]] = ..., include_deployment_checks: bool = ...
) -> Union[List[CheckMessage], List[int], List[str]]: ...
def tag_exists(
self, tag: str, include_deployment_checks: bool = ...
) -> bool: ...
def tag_exists(self, tag: str, include_deployment_checks: bool = ...) -> bool: ...
def tags_available(self, deployment_checks: bool = ...) -> Set[str]: ...
def get_checks(
self, include_deployment_checks: bool = ...
) -> List[Callable]: ...
def get_checks(self, include_deployment_checks: bool = ...) -> List[Callable]: ...
registry: Any
register: Any
@@ -17,20 +17,12 @@ W019: Any
W020: Any
W021: Any
def check_security_middleware(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_xframe_options_middleware(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_security_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_xframe_options_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_sts(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_sts_include_subdomains(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_sts_include_subdomains(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_sts_preload(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_content_type_nosniff(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_content_type_nosniff(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_xss_filter(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_ssl_redirect(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_secret_key(app_configs: None, **kwargs: Any) -> List[Warning]: ...
@@ -5,9 +5,5 @@ from django.core.checks.messages import Warning
W003: Any
W016: Any
def check_csrf_middleware(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_csrf_cookie_secure(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_csrf_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_csrf_cookie_secure(app_configs: None, **kwargs: Any) -> List[Warning]: ...
@@ -2,7 +2,6 @@ from typing import Any, List, Optional
from django.core.checks.messages import Warning
def add_session_cookie_message(message: Any): ...
W010: Any
@@ -15,9 +14,5 @@ W013: Any
W014: Any
W015: Any
def check_session_cookie_secure(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_session_cookie_httponly(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_session_cookie_secure(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_session_cookie_httponly(app_configs: None, **kwargs: Any) -> List[Warning]: ...
@@ -5,9 +5,5 @@ from django.core.checks.messages import Error
E001: Any
E002: Any
def check_setting_app_dirs_loaders(
app_configs: None, **kwargs: Any
) -> List[Error]: ...
def check_string_if_invalid_is_string(
app_configs: None, **kwargs: Any
) -> List[Error]: ...
def check_setting_app_dirs_loaders(app_configs: None, **kwargs: Any) -> List[Error]: ...
def check_string_if_invalid_is_string(app_configs: None, **kwargs: Any) -> List[Error]: ...
+3 -10
View File
@@ -3,16 +3,9 @@ from typing import Any, Callable, List, Optional, Tuple, Union
from django.core.checks.messages import CheckMessage, Error, Warning
from django.urls.resolvers import URLPattern, URLResolver
def check_url_config(
app_configs: None, **kwargs: Any
) -> List[CheckMessage]: ...
def check_resolver(
resolver: Union[Tuple[str, Callable], URLPattern, URLResolver]
) -> List[CheckMessage]: ...
def check_url_namespaces_unique(
app_configs: None, **kwargs: Any
) -> List[Warning]: ...
def check_url_config(app_configs: None, **kwargs: Any) -> List[CheckMessage]: ...
def check_resolver(resolver: Union[Tuple[str, Callable], URLPattern, URLResolver]) -> List[CheckMessage]: ...
def check_url_namespaces_unique(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def get_warning_for_invalid_pattern(pattern: Any) -> List[Error]: ...
def check_url_settings(app_configs: None, **kwargs: Any) -> List[Error]: ...
def E006(name: str) -> Error: ...