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

@@ -12,14 +12,11 @@ from django.template.defaulttags import CycleNode, IfChangedNode
from django.template.library import InclusionNode
from django.template.loader_tags import BlockContext
class ContextPopException(Exception): ...
class ContextDict(dict):
context: django.template.context.BaseContext = ...
def __init__(
self, context: BaseContext, *args: Any, **kwargs: Any
) -> None: ...
def __init__(self, context: BaseContext, *args: Any, **kwargs: Any) -> None: ...
def __enter__(self) -> ContextDict: ...
def __exit__(self, *args: Any, **kwargs: Any) -> None: ...
@@ -34,39 +31,22 @@ class BaseContext:
def __getitem__(self, key: Union[int, str]) -> Any: ...
def __delitem__(self, key: Any) -> None: ...
def __contains__(self, key: str) -> bool: ...
def get(
self, key: str, otherwise: Optional[int] = ...
) -> Optional[Union[Options, int, str]]: ...
def get(self, key: str, otherwise: Optional[int] = ...) -> Optional[Union[Options, int, str]]: ...
def setdefault(
self,
key: Union[IfChangedNode, str],
default: Optional[Union[List[Origin], int]] = ...,
self, key: Union[IfChangedNode, str], default: Optional[Union[List[Origin], int]] = ...
) -> Optional[Union[List[Origin], int]]: ...
def new(
self,
values: Optional[
Union[
Dict[
str,
Union[
List[Dict[str, Union[int, str]]],
List[ResultList],
List[BoundField],
ChangeList,
int,
],
],
Dict[str, Union[List[Dict[str, Union[int, str]]], List[ResultList], List[BoundField], ChangeList, int]],
Dict[str, Union[List[Dict[str, str]], ChangeList, int, str]],
Dict[str, Union[ChangeList, int, range, str]],
Context,
]
] = ...,
) -> Context: ...
def flatten(
self
) -> Dict[
str, Optional[Union[Dict[str, Union[Type[Any], str]], int, str]]
]: ...
def flatten(self) -> Dict[str, Optional[Union[Dict[str, Union[Type[Any], str]], int, str]]]: ...
def __eq__(self, other: Context) -> bool: ...
class Context(BaseContext):
@@ -77,36 +57,19 @@ class Context(BaseContext):
template_name: Optional[str] = ...
render_context: django.template.context.RenderContext = ...
template: Optional[django.template.base.Template] = ...
def __init__(
self,
dict_: Any = ...,
autoescape: bool = ...,
use_l10n: Optional[bool] = ...,
use_tz: None = ...,
) -> None: ...
def __init__(self, dict_: Any = ..., autoescape: bool = ..., use_l10n: Optional[bool] = ..., use_tz: None = ...) -> None: ...
def bind_template(self, template: Template) -> Iterator[None]: ...
def __copy__(self) -> Context: ...
def update(
self,
other_dict: Union[
Dict[str, Model], Dict[str, int], Dict[str, str], Context
],
) -> ContextDict: ...
def update(self, other_dict: Union[Dict[str, Model], Dict[str, int], Dict[str, str], Context]) -> ContextDict: ...
class RenderContext(BaseContext):
dicts: List[Dict[Union[django.template.loader_tags.IncludeNode, str], str]]
template: Optional[django.template.base.Template] = ...
def __iter__(self) -> None: ...
def __contains__(self, key: Union[CycleNode, str]) -> bool: ...
def get(
self, key: Union[InclusionNode, str], otherwise: None = ...
) -> Optional[Union[Template, BlockContext]]: ...
def __getitem__(
self, key: Union[Node, str]
) -> Optional[Union[List[Origin], BlockContext, cycle]]: ...
def push_state(
self, template: Template, isolated_context: bool = ...
) -> Iterator[None]: ...
def get(self, key: Union[InclusionNode, str], otherwise: None = ...) -> Optional[Union[Template, BlockContext]]: ...
def __getitem__(self, key: Union[Node, str]) -> Optional[Union[List[Origin], BlockContext, cycle]]: ...
def push_state(self, template: Template, isolated_context: bool = ...) -> Iterator[None]: ...
class RequestContext(Context):
autoescape: bool
@@ -119,9 +82,7 @@ class RequestContext(Context):
def __init__(
self,
request: HttpRequest,
dict_: Optional[
Dict[str, Union[Dict[str, Union[Type[Any], str]], str]]
] = ...,
dict_: Optional[Dict[str, Union[Dict[str, Union[Type[Any], str]], str]]] = ...,
processors: Optional[List[Callable]] = ...,
use_l10n: None = ...,
use_tz: None = ...,
@@ -135,22 +96,11 @@ class RequestContext(Context):
Union[
Dict[str, Union[Dict[str, str], List[Dict[str, str]], bool]],
Dict[str, Union[List[Any], ChangeList, int, str]],
Dict[
str,
Union[
List[Dict[str, Optional[Union[int, str]]]],
List[ResultList],
List[BoundField],
ChangeList,
int,
],
],
Dict[str, Union[List[Dict[str, Optional[Union[int, str]]]], List[ResultList], List[BoundField], ChangeList, int]],
Dict[str, Union[ChangeList, int, range, str]],
Context,
]
] = ...,
) -> RequestContext: ...
def make_context(
context: Any, request: Optional[HttpRequest] = ..., **kwargs: Any
) -> Context: ...
def make_context(context: Any, request: Optional[HttpRequest] = ..., **kwargs: Any) -> Context: ...