From cedc2d962e1611db64bcbc5dc3f526e6bf8ee51b Mon Sep 17 00:00:00 2001 From: Cyril Jouve Date: Fri, 1 Jun 2018 06:40:57 +0200 Subject: [PATCH] jinja2 loader types (#2179) --- third_party/2and3/jinja2/loaders.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/2and3/jinja2/loaders.pyi b/third_party/2and3/jinja2/loaders.pyi index 9c74ec2cf..203390650 100644 --- a/third_party/2and3/jinja2/loaders.pyi +++ b/third_party/2and3/jinja2/loaders.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, List, Optional, Text, Tuple +from typing import Any, Callable, Iterable, List, Optional, Text, Tuple, Union from types import ModuleType from .environment import Environment @@ -15,7 +15,7 @@ class FileSystemLoader(BaseLoader): searchpath = ... # type: Text encoding = ... # type: Any followlinks = ... # type: Any - def __init__(self, searchpath: Text, encoding: Text = ..., followlinks: bool = ...) -> None: ... + def __init__(self, searchpath: Union[Text, Iterable[Text]], encoding: Text = ..., followlinks: bool = ...) -> None: ... def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable]: ... def list_templates(self): ... @@ -38,7 +38,7 @@ class DictLoader(BaseLoader): class FunctionLoader(BaseLoader): load_func = ... # type: Any def __init__(self, load_func) -> None: ... - def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable]: ... + def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Optional[Text], Optional[Callable]]: ... class PrefixLoader(BaseLoader): mapping = ... # type: Any