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

@@ -10,7 +10,6 @@ from .context import _builtin_context_processors
from .exceptions import TemplateDoesNotExist
from .library import import_library
class Engine:
template_context_processors: Tuple[Callable]
template_loaders: List[django.template.loaders.base.Loader]
@@ -20,11 +19,7 @@ class Engine:
autoescape: bool = ...
context_processors: Union[List[str], Tuple[str]] = ...
debug: bool = ...
loaders: Union[
List[List[Union[Dict[str, str], str]]],
List[Tuple[str, List[str]]],
List[str],
] = ...
loaders: Union[List[List[Union[Dict[str, str], str]]], List[Tuple[str, List[str]]], List[str]] = ...
string_if_invalid: str = ...
file_charset: str = ...
libraries: Dict[str, str] = ...
@@ -37,13 +32,7 @@ class Engine:
app_dirs: bool = ...,
context_processors: Optional[Union[List[str], Tuple[str]]] = ...,
debug: bool = ...,
loaders: Optional[
Union[
List[List[Union[Dict[str, str], str]]],
List[Tuple[str, List[str]]],
List[str],
]
] = ...,
loaders: Optional[Union[List[List[Union[Dict[str, str], str]]], List[Tuple[str, List[str]]], List[str]]] = ...,
string_if_invalid: str = ...,
file_charset: str = ...,
libraries: Optional[Dict[str, str]] = ...,
@@ -54,30 +43,14 @@ class Engine:
def get_default() -> Engine: ...
def template_context_processors(self) -> Tuple[Callable]: ...
def get_template_builtins(self, builtins: List[str]) -> List[Library]: ...
def get_template_libraries(
self, libraries: Dict[str, str]
) -> Dict[str, Library]: ...
def get_template_libraries(self, libraries: Dict[str, str]) -> Dict[str, Library]: ...
def template_loaders(self) -> List[Loader]: ...
def get_template_loaders(
self,
template_loaders: Union[
List[List[Union[Dict[str, str], str]]],
List[Tuple[str, List[str]]],
List[str],
],
self, template_loaders: Union[List[List[Union[Dict[str, str], str]]], List[Tuple[str, List[str]]], List[str]]
) -> List[Loader]: ...
def find_template_loader(
self,
loader: Union[
List[Union[Dict[str, str], str]], Tuple[str, List[str]], str
],
) -> Loader: ...
def find_template(
self, name: str, dirs: None = ..., skip: Optional[List[Origin]] = ...
) -> Tuple[Template, Origin]: ...
def find_template_loader(self, loader: Union[List[Union[Dict[str, str], str]], Tuple[str, List[str]], str]) -> Loader: ...
def find_template(self, name: str, dirs: None = ..., skip: Optional[List[Origin]] = ...) -> Tuple[Template, Origin]: ...
def from_string(self, template_code: str) -> Template: ...
def get_template(self, template_name: str) -> Template: ...
def render_to_string(
self, template_name: str, context: Any = ...
) -> SafeText: ...
def render_to_string(self, template_name: str, context: Any = ...) -> SafeText: ...
def select_template(self, template_name_list: List[str]) -> Template: ...