mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add stubs for jinja2 (#722)
I added strong types to the class that users are likely to interact with and left the rest untyped for now. This is needed to support Flask. Permission is given here - https://github.com/pallets/flask/issues/2012
This commit is contained in:
committed by
Jukka Lehtosalo
parent
392eb4aa5a
commit
5d61aa5acb
11
third_party/2and3/jinja2/__init__.pyi
vendored
Normal file
11
third_party/2and3/jinja2/__init__.pyi
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Stubs for jinja2 (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from jinja2.environment import Environment as Environment, Template as Template
|
||||
from jinja2.loaders import BaseLoader as BaseLoader, FileSystemLoader as FileSystemLoader, PackageLoader as PackageLoader, DictLoader as DictLoader, FunctionLoader as FunctionLoader, PrefixLoader as PrefixLoader, ChoiceLoader as ChoiceLoader, ModuleLoader as ModuleLoader
|
||||
from jinja2.bccache import BytecodeCache as BytecodeCache, FileSystemBytecodeCache as FileSystemBytecodeCache, MemcachedBytecodeCache as MemcachedBytecodeCache
|
||||
from jinja2.runtime import Undefined as Undefined, DebugUndefined as DebugUndefined, StrictUndefined as StrictUndefined, make_logging_undefined as make_logging_undefined
|
||||
from jinja2.exceptions import TemplateError as TemplateError, UndefinedError as UndefinedError, TemplateNotFound as TemplateNotFound, TemplatesNotFound as TemplatesNotFound, TemplateSyntaxError as TemplateSyntaxError, TemplateAssertionError as TemplateAssertionError
|
||||
from jinja2.filters import environmentfilter as environmentfilter, contextfilter as contextfilter, evalcontextfilter as evalcontextfilter
|
||||
from jinja2.utils import Markup as Markup, escape as escape, clear_caches as clear_caches, environmentfunction as environmentfunction, evalcontextfunction as evalcontextfunction, contextfunction as contextfunction, is_undefined as is_undefined
|
||||
38
third_party/2and3/jinja2/_compat.pyi
vendored
Normal file
38
third_party/2and3/jinja2/_compat.pyi
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# Stubs for jinja2._compat (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
import sys
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
from io import BytesIO
|
||||
from urllib.parse import quote_from_bytes as url_quote
|
||||
else:
|
||||
from cStringIO import StringIO as BytesIO
|
||||
from urllib import quote as url_quote
|
||||
|
||||
PY2 = ... # type: Any
|
||||
PYPY = ... # type: Any
|
||||
unichr = ... # type: Any
|
||||
range_type = ... # type: Any
|
||||
text_type = ... # type: Any
|
||||
string_types = ... # type: Any
|
||||
integer_types = ... # type: Any
|
||||
iterkeys = ... # type: Any
|
||||
itervalues = ... # type: Any
|
||||
iteritems = ... # type: Any
|
||||
NativeStringIO = ... # type: Any
|
||||
|
||||
def reraise(tp, value, tb: Optional[Any] = ...): ...
|
||||
|
||||
ifilter = ... # type: Any
|
||||
imap = ... # type: Any
|
||||
izip = ... # type: Any
|
||||
intern = ... # type: Any
|
||||
implements_iterator = ... # type: Any
|
||||
implements_to_string = ... # type: Any
|
||||
encode_filename = ... # type: Any
|
||||
get_next = ... # type: Any
|
||||
|
||||
def with_metaclass(meta, *bases): ...
|
||||
44
third_party/2and3/jinja2/_stringdefs.pyi
vendored
Normal file
44
third_party/2and3/jinja2/_stringdefs.pyi
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# Stubs for jinja2._stringdefs (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
Cc = ... # type: str
|
||||
Cf = ... # type: str
|
||||
Cn = ... # type: str
|
||||
Co = ... # type: str
|
||||
Cs = ... # type: Any
|
||||
Ll = ... # type: str
|
||||
Lm = ... # type: str
|
||||
Lo = ... # type: str
|
||||
Lt = ... # type: str
|
||||
Lu = ... # type: str
|
||||
Mc = ... # type: str
|
||||
Me = ... # type: str
|
||||
Mn = ... # type: str
|
||||
Nd = ... # type: str
|
||||
Nl = ... # type: str
|
||||
No = ... # type: str
|
||||
Pc = ... # type: str
|
||||
Pd = ... # type: str
|
||||
Pe = ... # type: str
|
||||
Pf = ... # type: str
|
||||
Pi = ... # type: str
|
||||
Po = ... # type: str
|
||||
Ps = ... # type: str
|
||||
Sc = ... # type: str
|
||||
Sk = ... # type: str
|
||||
Sm = ... # type: str
|
||||
So = ... # type: str
|
||||
Zl = ... # type: str
|
||||
Zp = ... # type: str
|
||||
Zs = ... # type: str
|
||||
cats = ... # type: Any
|
||||
|
||||
def combine(*args): ...
|
||||
|
||||
xid_start = ... # type: str
|
||||
xid_continue = ... # type: str
|
||||
|
||||
def allexcept(*args): ...
|
||||
48
third_party/2and3/jinja2/bccache.pyi
vendored
Normal file
48
third_party/2and3/jinja2/bccache.pyi
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# Stubs for jinja2.bccache (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
marshal_dump = ... # type: Any
|
||||
marshal_load = ... # type: Any
|
||||
bc_version = ... # type: int
|
||||
bc_magic = ... # type: Any
|
||||
|
||||
class Bucket:
|
||||
environment = ... # type: Any
|
||||
key = ... # type: Any
|
||||
checksum = ... # type: Any
|
||||
def __init__(self, environment, key, checksum) -> None: ...
|
||||
code = ... # type: Any
|
||||
def reset(self): ...
|
||||
def load_bytecode(self, f): ...
|
||||
def write_bytecode(self, f): ...
|
||||
def bytecode_from_string(self, string): ...
|
||||
def bytecode_to_string(self): ...
|
||||
|
||||
class BytecodeCache:
|
||||
def load_bytecode(self, bucket): ...
|
||||
def dump_bytecode(self, bucket): ...
|
||||
def clear(self): ...
|
||||
def get_cache_key(self, name, filename: Optional[Any] = ...): ...
|
||||
def get_source_checksum(self, source): ...
|
||||
def get_bucket(self, environment, name, filename, source): ...
|
||||
def set_bucket(self, bucket): ...
|
||||
|
||||
class FileSystemBytecodeCache(BytecodeCache):
|
||||
directory = ... # type: Any
|
||||
pattern = ... # type: Any
|
||||
def __init__(self, directory: Optional[Any] = ..., pattern: str = ...) -> None: ...
|
||||
def load_bytecode(self, bucket): ...
|
||||
def dump_bytecode(self, bucket): ...
|
||||
def clear(self): ...
|
||||
|
||||
class MemcachedBytecodeCache(BytecodeCache):
|
||||
client = ... # type: Any
|
||||
prefix = ... # type: Any
|
||||
timeout = ... # type: Any
|
||||
ignore_memcache_errors = ... # type: Any
|
||||
def __init__(self, client, prefix: str = ..., timeout: Optional[Any] = ..., ignore_memcache_errors: bool = ...) -> None: ...
|
||||
def load_bytecode(self, bucket): ...
|
||||
def dump_bytecode(self, bucket): ...
|
||||
180
third_party/2and3/jinja2/compiler.pyi
vendored
Normal file
180
third_party/2and3/jinja2/compiler.pyi
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
# Stubs for jinja2.compiler (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
from keyword import iskeyword as is_python_keyword
|
||||
from jinja2.visitor import NodeVisitor
|
||||
|
||||
operators = ... # type: Any
|
||||
dict_item_iter = ... # type: str
|
||||
|
||||
unoptimize_before_dead_code = ... # type: bool
|
||||
|
||||
def generate(node, environment, name, filename, stream: Optional[Any] = ..., defer_init: bool = ...): ...
|
||||
def has_safe_repr(value): ...
|
||||
def find_undeclared(nodes, names): ...
|
||||
|
||||
class Identifiers:
|
||||
declared = ... # type: Any
|
||||
outer_undeclared = ... # type: Any
|
||||
undeclared = ... # type: Any
|
||||
declared_locally = ... # type: Any
|
||||
declared_parameter = ... # type: Any
|
||||
def __init__(self) -> None: ...
|
||||
def add_special(self, name): ...
|
||||
def is_declared(self, name): ...
|
||||
def copy(self): ...
|
||||
|
||||
class Frame:
|
||||
eval_ctx = ... # type: Any
|
||||
identifiers = ... # type: Any
|
||||
toplevel = ... # type: bool
|
||||
rootlevel = ... # type: bool
|
||||
require_output_check = ... # type: Any
|
||||
buffer = ... # type: Any
|
||||
block = ... # type: Any
|
||||
assigned_names = ... # type: Any
|
||||
parent = ... # type: Any
|
||||
def __init__(self, eval_ctx, parent: Optional[Any] = ...) -> None: ...
|
||||
def copy(self): ...
|
||||
def inspect(self, nodes): ...
|
||||
def find_shadowed(self, extra: Any = ...): ...
|
||||
def inner(self): ...
|
||||
def soft(self): ...
|
||||
__copy__ = ... # type: Any
|
||||
|
||||
class VisitorExit(RuntimeError): ...
|
||||
|
||||
class DependencyFinderVisitor(NodeVisitor):
|
||||
filters = ... # type: Any
|
||||
tests = ... # type: Any
|
||||
def __init__(self) -> None: ...
|
||||
def visit_Filter(self, node): ...
|
||||
def visit_Test(self, node): ...
|
||||
def visit_Block(self, node): ...
|
||||
|
||||
class UndeclaredNameVisitor(NodeVisitor):
|
||||
names = ... # type: Any
|
||||
undeclared = ... # type: Any
|
||||
def __init__(self, names) -> None: ...
|
||||
def visit_Name(self, node): ...
|
||||
def visit_Block(self, node): ...
|
||||
|
||||
class FrameIdentifierVisitor(NodeVisitor):
|
||||
identifiers = ... # type: Any
|
||||
def __init__(self, identifiers) -> None: ...
|
||||
def visit_Name(self, node): ...
|
||||
def visit_If(self, node): ...
|
||||
def visit_Macro(self, node): ...
|
||||
def visit_Import(self, node): ...
|
||||
def visit_FromImport(self, node): ...
|
||||
def visit_Assign(self, node): ...
|
||||
def visit_For(self, node): ...
|
||||
def visit_CallBlock(self, node): ...
|
||||
def visit_FilterBlock(self, node): ...
|
||||
def visit_AssignBlock(self, node): ...
|
||||
def visit_Scope(self, node): ...
|
||||
def visit_Block(self, node): ...
|
||||
|
||||
class CompilerExit(Exception): ...
|
||||
|
||||
class CodeGenerator(NodeVisitor):
|
||||
environment = ... # type: Any
|
||||
name = ... # type: Any
|
||||
filename = ... # type: Any
|
||||
stream = ... # type: Any
|
||||
created_block_context = ... # type: bool
|
||||
defer_init = ... # type: Any
|
||||
import_aliases = ... # type: Any
|
||||
blocks = ... # type: Any
|
||||
extends_so_far = ... # type: int
|
||||
has_known_extends = ... # type: bool
|
||||
code_lineno = ... # type: int
|
||||
tests = ... # type: Any
|
||||
filters = ... # type: Any
|
||||
debug_info = ... # type: Any
|
||||
def __init__(self, environment, name, filename, stream: Optional[Any] = ..., defer_init: bool = ...) -> None: ...
|
||||
def fail(self, msg, lineno): ...
|
||||
def temporary_identifier(self): ...
|
||||
def buffer(self, frame): ...
|
||||
def return_buffer_contents(self, frame): ...
|
||||
def indent(self): ...
|
||||
def outdent(self, step: int = ...): ...
|
||||
def start_write(self, frame, node: Optional[Any] = ...): ...
|
||||
def end_write(self, frame): ...
|
||||
def simple_write(self, s, frame, node: Optional[Any] = ...): ...
|
||||
def blockvisit(self, nodes, frame): ...
|
||||
def write(self, x): ...
|
||||
def writeline(self, x, node: Optional[Any] = ..., extra: int = ...): ...
|
||||
def newline(self, node: Optional[Any] = ..., extra: int = ...): ...
|
||||
def signature(self, node, frame, extra_kwargs: Optional[Any] = ...): ...
|
||||
def pull_locals(self, frame): ...
|
||||
def pull_dependencies(self, nodes): ...
|
||||
def unoptimize_scope(self, frame): ...
|
||||
def push_scope(self, frame, extra_vars: Any = ...): ...
|
||||
def pop_scope(self, aliases, frame): ...
|
||||
def function_scoping(self, node, frame, children: Optional[Any] = ..., find_special: bool = ...): ...
|
||||
def macro_body(self, node, frame, children: Optional[Any] = ...): ...
|
||||
def macro_def(self, node, frame): ...
|
||||
def position(self, node): ...
|
||||
def visit_Template(self, node, frame: Optional[Any] = ...): ...
|
||||
def visit_Block(self, node, frame): ...
|
||||
def visit_Extends(self, node, frame): ...
|
||||
def visit_Include(self, node, frame): ...
|
||||
def visit_Import(self, node, frame): ...
|
||||
def visit_FromImport(self, node, frame): ...
|
||||
def visit_For(self, node, frame): ...
|
||||
def visit_If(self, node, frame): ...
|
||||
def visit_Macro(self, node, frame): ...
|
||||
def visit_CallBlock(self, node, frame): ...
|
||||
def visit_FilterBlock(self, node, frame): ...
|
||||
def visit_ExprStmt(self, node, frame): ...
|
||||
def visit_Output(self, node, frame): ...
|
||||
def make_assignment_frame(self, frame): ...
|
||||
def export_assigned_vars(self, frame, assignment_frame): ...
|
||||
def visit_Assign(self, node, frame): ...
|
||||
def visit_AssignBlock(self, node, frame): ...
|
||||
def visit_Name(self, node, frame): ...
|
||||
def visit_Const(self, node, frame): ...
|
||||
def visit_TemplateData(self, node, frame): ...
|
||||
def visit_Tuple(self, node, frame): ...
|
||||
def visit_List(self, node, frame): ...
|
||||
def visit_Dict(self, node, frame): ...
|
||||
def binop(operator, interceptable: bool = ...): ...
|
||||
def uaop(operator, interceptable: bool = ...): ...
|
||||
visit_Add = ... # type: Any
|
||||
visit_Sub = ... # type: Any
|
||||
visit_Mul = ... # type: Any
|
||||
visit_Div = ... # type: Any
|
||||
visit_FloorDiv = ... # type: Any
|
||||
visit_Pow = ... # type: Any
|
||||
visit_Mod = ... # type: Any
|
||||
visit_And = ... # type: Any
|
||||
visit_Or = ... # type: Any
|
||||
visit_Pos = ... # type: Any
|
||||
visit_Neg = ... # type: Any
|
||||
visit_Not = ... # type: Any
|
||||
def visit_Concat(self, node, frame): ...
|
||||
def visit_Compare(self, node, frame): ...
|
||||
def visit_Operand(self, node, frame): ...
|
||||
def visit_Getattr(self, node, frame): ...
|
||||
def visit_Getitem(self, node, frame): ...
|
||||
def visit_Slice(self, node, frame): ...
|
||||
def visit_Filter(self, node, frame): ...
|
||||
def visit_Test(self, node, frame): ...
|
||||
def visit_CondExpr(self, node, frame): ...
|
||||
def visit_Call(self, node, frame, forward_caller: bool = ...): ...
|
||||
def visit_Keyword(self, node, frame): ...
|
||||
def visit_MarkSafe(self, node, frame): ...
|
||||
def visit_MarkSafeIfAutoescape(self, node, frame): ...
|
||||
def visit_EnvironmentAttribute(self, node, frame): ...
|
||||
def visit_ExtensionAttribute(self, node, frame): ...
|
||||
def visit_ImportedName(self, node, frame): ...
|
||||
def visit_InternalName(self, node, frame): ...
|
||||
def visit_ContextReference(self, node, frame): ...
|
||||
def visit_Continue(self, node, frame): ...
|
||||
def visit_Break(self, node, frame): ...
|
||||
def visit_Scope(self, node, frame): ...
|
||||
def visit_EvalContextModifier(self, node, frame): ...
|
||||
def visit_ScopedEvalContextModifier(self, node, frame): ...
|
||||
5
third_party/2and3/jinja2/constants.pyi
vendored
Normal file
5
third_party/2and3/jinja2/constants.pyi
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Stubs for jinja2.constants (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
LOREM_IPSUM_WORDS = ... # type: str
|
||||
41
third_party/2and3/jinja2/debug.pyi
vendored
Normal file
41
third_party/2and3/jinja2/debug.pyi
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# Stubs for jinja2.debug (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
tproxy = ... # type: Any
|
||||
raise_helper = ... # type: str
|
||||
|
||||
class TracebackFrameProxy:
|
||||
tb = ... # type: Any
|
||||
def __init__(self, tb) -> None: ...
|
||||
@property
|
||||
def tb_next(self): ...
|
||||
def set_next(self, next): ...
|
||||
@property
|
||||
def is_jinja_frame(self): ...
|
||||
def __getattr__(self, name): ...
|
||||
|
||||
def make_frame_proxy(frame): ...
|
||||
|
||||
class ProcessedTraceback:
|
||||
exc_type = ... # type: Any
|
||||
exc_value = ... # type: Any
|
||||
frames = ... # type: Any
|
||||
def __init__(self, exc_type, exc_value, frames) -> None: ...
|
||||
def render_as_text(self, limit: Optional[Any] = ...): ...
|
||||
def render_as_html(self, full: bool = ...): ...
|
||||
@property
|
||||
def is_template_syntax_error(self): ...
|
||||
@property
|
||||
def exc_info(self): ...
|
||||
@property
|
||||
def standard_exc_info(self): ...
|
||||
|
||||
def make_traceback(exc_info, source_hint: Optional[Any] = ...): ...
|
||||
def translate_syntax_error(error, source: Optional[Any] = ...): ...
|
||||
def translate_exception(exc_info, initial_skip: int = ...): ...
|
||||
def fake_exc_info(exc_info, filename, lineno): ...
|
||||
|
||||
tb_set_next = ... # type: Any
|
||||
25
third_party/2and3/jinja2/defaults.pyi
vendored
Normal file
25
third_party/2and3/jinja2/defaults.pyi
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Stubs for jinja2.defaults (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from jinja2.filters import FILTERS as DEFAULT_FILTERS
|
||||
from jinja2.tests import TESTS as DEFAULT_TESTS
|
||||
|
||||
BLOCK_START_STRING = ... # type: str
|
||||
BLOCK_END_STRING = ... # type: str
|
||||
VARIABLE_START_STRING = ... # type: str
|
||||
VARIABLE_END_STRING = ... # type: str
|
||||
COMMENT_START_STRING = ... # type: str
|
||||
COMMENT_END_STRING = ... # type: str
|
||||
LINE_STATEMENT_PREFIX = ... # type: Any
|
||||
LINE_COMMENT_PREFIX = ... # type: Any
|
||||
TRIM_BLOCKS = ... # type: bool
|
||||
LSTRIP_BLOCKS = ... # type: bool
|
||||
NEWLINE_SEQUENCE = ... # type: str
|
||||
KEEP_TRAILING_NEWLINE = ... # type: bool
|
||||
DEFAULT_NAMESPACE = ... # type: Any
|
||||
|
||||
# Names in __all__ with no definition:
|
||||
# DEFAULT_FILTERS
|
||||
# DEFAULT_TESTS
|
||||
109
third_party/2and3/jinja2/environment.pyi
vendored
Normal file
109
third_party/2and3/jinja2/environment.pyi
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
# Stubs for jinja2.environment (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Text, Type, Union
|
||||
|
||||
from .bccache import BytecodeCache
|
||||
from .loaders import BaseLoader
|
||||
from .runtime import Context, Undefined
|
||||
|
||||
def get_spontaneous_environment(*args): ...
|
||||
def create_cache(size): ...
|
||||
def copy_cache(cache): ...
|
||||
def load_extensions(environment, extensions): ...
|
||||
|
||||
class Environment:
|
||||
sandboxed = ... # type: bool
|
||||
overlayed = ... # type: bool
|
||||
linked_to = ... # type: Any
|
||||
shared = ... # type: bool
|
||||
exception_handler = ... # type: Any
|
||||
exception_formatter = ... # type: Any
|
||||
code_generator_class = ... # type: Any
|
||||
context_class = ... # type: Any
|
||||
block_start_string = ... # type: Text
|
||||
block_end_string = ... # type: Text
|
||||
variable_start_string = ... # type: Text
|
||||
variable_end_string = ... # type: Text
|
||||
comment_start_string = ... # type: Text
|
||||
comment_end_string = ... # type: Text
|
||||
line_statement_prefix = ... # type: Text
|
||||
line_comment_prefix = ... # type: Text
|
||||
trim_blocks = ... # type: bool
|
||||
lstrip_blocks = ... # type: Any
|
||||
newline_sequence = ... # type: Text
|
||||
keep_trailing_newline = ... # type: bool
|
||||
undefined = ... # type: Type[Undefined]
|
||||
optimized = ... # type: bool
|
||||
finalize = ... # type: Callable
|
||||
autoescape = ... # type: Any
|
||||
filters = ... # type: Any
|
||||
tests = ... # type: Any
|
||||
globals = ... # type: Dict[str, Any]
|
||||
loader = ... # type: BaseLoader
|
||||
cache = ... # type: Any
|
||||
bytecode_cache = ... # type: BytecodeCache
|
||||
auto_reload = ... # type: bool
|
||||
extensions = ... # type: List
|
||||
def __init__(self, block_start_string: Text = ..., block_end_string: Text = ..., variable_start_string: Text = ..., variable_end_string: Text = ..., comment_start_string: Any = ..., comment_end_string: Text = ..., line_statement_prefix: Text = ..., line_comment_prefix: Text = ..., trim_blocks: bool = ..., lstrip_blocks: bool = ..., newline_sequence: Text = ..., keep_trailing_newline: bool = ..., extensions: List = ..., optimized: bool = ..., undefined: Type[Undefined] = ..., finalize: Optional[Callable] = ..., autoescape: bool = ..., loader: Optional[BaseLoader] = ..., cache_size: int = ..., auto_reload: bool = ..., bytecode_cache: Optional[BytecodeCache] = ...) -> None: ...
|
||||
def add_extension(self, extension): ...
|
||||
def extend(self, **attributes): ...
|
||||
def overlay(self, block_start_string: Text = ..., block_end_string: Text = ..., variable_start_string: Text = ..., variable_end_string: Text = ..., comment_start_string: Any = ..., comment_end_string: Text = ..., line_statement_prefix: Text = ..., line_comment_prefix: Text = ..., trim_blocks: bool = ..., lstrip_blocks: bool = ..., extensions: List = ..., optimized: bool = ..., undefined: Type[Undefined] = ..., finalize: Callable = ..., autoescape: bool = ..., loader: Optional[BaseLoader] = ..., cache_size: int = ..., auto_reload: bool = ..., bytecode_cache: Optional[BytecodeCache] = ...): ...
|
||||
lexer = ... # type: Any
|
||||
def iter_extensions(self): ...
|
||||
def getitem(self, obj, argument): ...
|
||||
def getattr(self, obj, attribute): ...
|
||||
def call_filter(self, name, value, args: Optional[Any] = ..., kwargs: Optional[Any] = ..., context: Optional[Any] = ..., eval_ctx: Optional[Any] = ...): ...
|
||||
def call_test(self, name, value, args: Optional[Any] = ..., kwargs: Optional[Any] = ...): ...
|
||||
def parse(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
|
||||
def lex(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
|
||||
def preprocess(self, source: Text, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
|
||||
def compile(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., raw: bool = ..., defer_init: bool = ...): ...
|
||||
def compile_expression(self, source: Text, undefined_to_none: bool = ...): ...
|
||||
def compile_templates(self, target, extensions: Optional[Any] = ..., filter_func: Optional[Any] = ..., zip: str = ..., log_function: Optional[Any] = ..., ignore_errors: bool = ..., py_compile: bool = ...): ...
|
||||
def list_templates(self, extensions: Optional[Any] = ..., filter_func: Optional[Any] = ...): ...
|
||||
def handle_exception(self, exc_info: Optional[Any] = ..., rendered: bool = ..., source_hint: Optional[Any] = ...): ...
|
||||
def join_path(self, template: Union[Template, Text], parent: Text) -> Text: ...
|
||||
def get_template(self, name: Union[Template, Text], parent: Optional[Text] = ..., globals: Optional[Any] = ...) -> Template: ...
|
||||
def select_template(self, names: List[Union[Template, Text]], parent: Optional[Text] = ..., globals: Optional[Dict[str, Any]] = ...) -> Template: ...
|
||||
def get_or_select_template(self, template_name_or_list: Union[Union[Template, Text], List[Union[Template, Text]]], parent: Optional[Text] = ..., globals: Optional[Dict[str, Any]] = ...) -> Template: ...
|
||||
def from_string(self, source: Text, globals: Optional[Dict[str, Any]] = ..., template_class: Optional[Type[Template]] = ...) -> Template: ...
|
||||
def make_globals(self, d: Optional[Dict[str, Any]]) -> Dict[str, Any]: ...
|
||||
|
||||
class Template:
|
||||
def __new__(cls, source, block_start_string: Any = ..., block_end_string: Any = ..., variable_start_string: Any = ..., variable_end_string: Any = ..., comment_start_string: Any = ..., comment_end_string: Any = ..., line_statement_prefix: Any = ..., line_comment_prefix: Any = ..., trim_blocks: Any = ..., lstrip_blocks: Any = ..., newline_sequence: Any = ..., keep_trailing_newline: Any = ..., extensions: Any = ..., optimized: bool = ..., undefined: Any = ..., finalize: Optional[Any] = ..., autoescape: bool = ...): ...
|
||||
@classmethod
|
||||
def from_code(cls, environment, code, globals, uptodate: Optional[Any] = ...): ...
|
||||
@classmethod
|
||||
def from_module_dict(cls, environment, module_dict, globals): ...
|
||||
def render(self, *args, **kwargs) -> Text: ...
|
||||
def stream(self, *args, **kwargs) -> TemplateStream: ...
|
||||
def generate(self, *args, **kwargs) -> Iterator[Text]: ...
|
||||
def new_context(self, vars: Optional[Dict[str, Any]] = ..., shared: bool = ..., locals: Optional[Dict[str, Any]] = ...) -> Context: ...
|
||||
def make_module(self, vars: Optional[Dict[str, Any]] = ..., shared: bool = ..., locals: Optional[Dict[str, Any]] = ...) -> Context: ...
|
||||
@property
|
||||
def module(self) -> Any: ...
|
||||
def get_corresponding_lineno(self, lineno): ...
|
||||
@property
|
||||
def is_up_to_date(self) -> bool: ...
|
||||
@property
|
||||
def debug_info(self): ...
|
||||
|
||||
class TemplateModule:
|
||||
__name__ = ... # type: Any
|
||||
def __init__(self, template, context) -> None: ...
|
||||
def __html__(self): ...
|
||||
|
||||
class TemplateExpression:
|
||||
def __init__(self, template, undefined_to_none) -> None: ...
|
||||
def __call__(self, *args, **kwargs): ...
|
||||
|
||||
class TemplateStream:
|
||||
def __init__(self, gen) -> None: ...
|
||||
def dump(self, fp, encoding: Optional[Text] = ..., errors: Text = ...): ...
|
||||
buffered = ... # type: bool
|
||||
def disable_buffering(self) -> None: ...
|
||||
def enable_buffering(self, size: int = ...) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
37
third_party/2and3/jinja2/exceptions.pyi
vendored
Normal file
37
third_party/2and3/jinja2/exceptions.pyi
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# Stubs for jinja2.exceptions (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional, Text
|
||||
|
||||
class TemplateError(Exception):
|
||||
def __init__(self, message: Optional[Text] = ...) -> None: ...
|
||||
@property
|
||||
def message(self): ...
|
||||
def __unicode__(self): ...
|
||||
@property
|
||||
def message(self): ...
|
||||
|
||||
class TemplateNotFound(IOError, LookupError, TemplateError):
|
||||
message = ... # type: Any
|
||||
name = ... # type: Any
|
||||
templates = ... # type: Any
|
||||
def __init__(self, name, message: Optional[Text] = ...) -> None: ...
|
||||
|
||||
class TemplatesNotFound(TemplateNotFound):
|
||||
templates = ... # type: Any
|
||||
def __init__(self, names: Any = ..., message: Optional[Text] = ...) -> None: ...
|
||||
|
||||
class TemplateSyntaxError(TemplateError):
|
||||
lineno = ... # type: int
|
||||
name = ... # type: Text
|
||||
filename = ... # type: Text
|
||||
source = ... # type: Text
|
||||
translated = ... # type: bool
|
||||
def __init__(self, message: Text, lineno: int, name: Optional[Text] = ..., filename: Optional[Text] = ...) -> None: ...
|
||||
|
||||
class TemplateAssertionError(TemplateSyntaxError): ...
|
||||
class TemplateRuntimeError(TemplateError): ...
|
||||
class UndefinedError(TemplateRuntimeError): ...
|
||||
class SecurityError(TemplateRuntimeError): ...
|
||||
class FilterArgumentError(TemplateRuntimeError): ...
|
||||
62
third_party/2and3/jinja2/ext.pyi
vendored
Normal file
62
third_party/2and3/jinja2/ext.pyi
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
# Stubs for jinja2.ext (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
GETTEXT_FUNCTIONS = ... # type: Any
|
||||
|
||||
class ExtensionRegistry(type):
|
||||
def __new__(cls, name, bases, d): ...
|
||||
|
||||
class Extension:
|
||||
tags = ... # type: Any
|
||||
priority = ... # type: int
|
||||
environment = ... # type: Any
|
||||
def __init__(self, environment) -> None: ...
|
||||
def bind(self, environment): ...
|
||||
def preprocess(self, source, name, filename: Optional[Any] = ...): ...
|
||||
def filter_stream(self, stream): ...
|
||||
def parse(self, parser): ...
|
||||
def attr(self, name, lineno: Optional[Any] = ...): ...
|
||||
def call_method(self, name, args: Optional[Any] = ..., kwargs: Optional[Any] = ..., dyn_args: Optional[Any] = ..., dyn_kwargs: Optional[Any] = ..., lineno: Optional[Any] = ...): ...
|
||||
|
||||
class InternationalizationExtension(Extension):
|
||||
tags = ... # type: Any
|
||||
def __init__(self, environment) -> None: ...
|
||||
def parse(self, parser): ...
|
||||
|
||||
class ExprStmtExtension(Extension):
|
||||
tags = ... # type: Any
|
||||
def parse(self, parser): ...
|
||||
|
||||
class LoopControlExtension(Extension):
|
||||
tags = ... # type: Any
|
||||
def parse(self, parser): ...
|
||||
|
||||
class WithExtension(Extension):
|
||||
tags = ... # type: Any
|
||||
def parse(self, parser): ...
|
||||
|
||||
class AutoEscapeExtension(Extension):
|
||||
tags = ... # type: Any
|
||||
def parse(self, parser): ...
|
||||
|
||||
def extract_from_ast(node, gettext_functions: Any = ..., babel_style: bool = ...): ...
|
||||
|
||||
class _CommentFinder:
|
||||
tokens = ... # type: Any
|
||||
comment_tags = ... # type: Any
|
||||
offset = ... # type: int
|
||||
last_lineno = ... # type: int
|
||||
def __init__(self, tokens, comment_tags) -> None: ...
|
||||
def find_backwards(self, offset): ...
|
||||
def find_comments(self, lineno): ...
|
||||
|
||||
def babel_extract(fileobj, keywords, comment_tags, options): ...
|
||||
|
||||
i18n = ... # type: Any
|
||||
do = ... # type: Any
|
||||
loopcontrols = ... # type: Any
|
||||
with_ = ... # type: Any
|
||||
autoescape = ... # type: Any
|
||||
61
third_party/2and3/jinja2/filters.pyi
vendored
Normal file
61
third_party/2and3/jinja2/filters.pyi
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# Stubs for jinja2.filters (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
def contextfilter(f): ...
|
||||
def evalcontextfilter(f): ...
|
||||
def environmentfilter(f): ...
|
||||
def make_attrgetter(environment, attribute): ...
|
||||
def do_forceescape(value): ...
|
||||
def do_urlencode(value): ...
|
||||
def do_replace(eval_ctx, s, old, new, count: Optional[Any] = ...): ...
|
||||
def do_upper(s): ...
|
||||
def do_lower(s): ...
|
||||
def do_xmlattr(_eval_ctx, d, autospace: bool = ...): ...
|
||||
def do_capitalize(s): ...
|
||||
def do_title(s): ...
|
||||
def do_dictsort(value, case_sensitive: bool = ..., by: str = ...): ...
|
||||
def do_sort(environment, value, reverse: bool = ..., case_sensitive: bool = ..., attribute: Optional[Any] = ...): ...
|
||||
def do_default(value, default_value: str = ..., boolean: bool = ...): ...
|
||||
def do_join(eval_ctx, value, d: str = ..., attribute: Optional[Any] = ...): ...
|
||||
def do_center(value, width: int = ...): ...
|
||||
def do_first(environment, seq): ...
|
||||
def do_last(environment, seq): ...
|
||||
def do_random(environment, seq): ...
|
||||
def do_filesizeformat(value, binary: bool = ...): ...
|
||||
def do_pprint(value, verbose: bool = ...): ...
|
||||
def do_urlize(eval_ctx, value, trim_url_limit: Optional[Any] = ..., nofollow: bool = ..., target: Optional[Any] = ...): ...
|
||||
def do_indent(s, width: int = ..., indentfirst: bool = ...): ...
|
||||
def do_truncate(s, length: int = ..., killwords: bool = ..., end: str = ...): ...
|
||||
def do_wordwrap(environment, s, width: int = ..., break_long_words: bool = ..., wrapstring: Optional[Any] = ...): ...
|
||||
def do_wordcount(s): ...
|
||||
def do_int(value, default: int = ..., base: int = ...): ...
|
||||
def do_float(value, default: float = ...): ...
|
||||
def do_format(value, *args, **kwargs): ...
|
||||
def do_trim(value): ...
|
||||
def do_striptags(value): ...
|
||||
def do_slice(value, slices, fill_with: Optional[Any] = ...): ...
|
||||
def do_batch(value, linecount, fill_with: Optional[Any] = ...): ...
|
||||
def do_round(value, precision: int = ..., method: str = ...): ...
|
||||
def do_groupby(environment, value, attribute): ...
|
||||
|
||||
class _GroupTuple(tuple):
|
||||
grouper = ... # type: Any
|
||||
list = ... # type: Any
|
||||
def __new__(cls, xxx_todo_changeme): ...
|
||||
|
||||
def do_sum(environment, iterable, attribute: Optional[Any] = ..., start: int = ...): ...
|
||||
def do_list(value): ...
|
||||
def do_mark_safe(value): ...
|
||||
def do_mark_unsafe(value): ...
|
||||
def do_reverse(value): ...
|
||||
def do_attr(environment, obj, name): ...
|
||||
def do_map(*args, **kwargs): ...
|
||||
def do_select(*args, **kwargs): ...
|
||||
def do_reject(*args, **kwargs): ...
|
||||
def do_selectattr(*args, **kwargs): ...
|
||||
def do_rejectattr(*args, **kwargs): ...
|
||||
|
||||
FILTERS = ... # type: Any
|
||||
121
third_party/2and3/jinja2/lexer.pyi
vendored
Normal file
121
third_party/2and3/jinja2/lexer.pyi
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
# Stubs for jinja2.lexer (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
whitespace_re = ... # type: Any
|
||||
string_re = ... # type: Any
|
||||
integer_re = ... # type: Any
|
||||
name_re = ... # type: Any
|
||||
float_re = ... # type: Any
|
||||
newline_re = ... # type: Any
|
||||
TOKEN_ADD = ... # type: Any
|
||||
TOKEN_ASSIGN = ... # type: Any
|
||||
TOKEN_COLON = ... # type: Any
|
||||
TOKEN_COMMA = ... # type: Any
|
||||
TOKEN_DIV = ... # type: Any
|
||||
TOKEN_DOT = ... # type: Any
|
||||
TOKEN_EQ = ... # type: Any
|
||||
TOKEN_FLOORDIV = ... # type: Any
|
||||
TOKEN_GT = ... # type: Any
|
||||
TOKEN_GTEQ = ... # type: Any
|
||||
TOKEN_LBRACE = ... # type: Any
|
||||
TOKEN_LBRACKET = ... # type: Any
|
||||
TOKEN_LPAREN = ... # type: Any
|
||||
TOKEN_LT = ... # type: Any
|
||||
TOKEN_LTEQ = ... # type: Any
|
||||
TOKEN_MOD = ... # type: Any
|
||||
TOKEN_MUL = ... # type: Any
|
||||
TOKEN_NE = ... # type: Any
|
||||
TOKEN_PIPE = ... # type: Any
|
||||
TOKEN_POW = ... # type: Any
|
||||
TOKEN_RBRACE = ... # type: Any
|
||||
TOKEN_RBRACKET = ... # type: Any
|
||||
TOKEN_RPAREN = ... # type: Any
|
||||
TOKEN_SEMICOLON = ... # type: Any
|
||||
TOKEN_SUB = ... # type: Any
|
||||
TOKEN_TILDE = ... # type: Any
|
||||
TOKEN_WHITESPACE = ... # type: Any
|
||||
TOKEN_FLOAT = ... # type: Any
|
||||
TOKEN_INTEGER = ... # type: Any
|
||||
TOKEN_NAME = ... # type: Any
|
||||
TOKEN_STRING = ... # type: Any
|
||||
TOKEN_OPERATOR = ... # type: Any
|
||||
TOKEN_BLOCK_BEGIN = ... # type: Any
|
||||
TOKEN_BLOCK_END = ... # type: Any
|
||||
TOKEN_VARIABLE_BEGIN = ... # type: Any
|
||||
TOKEN_VARIABLE_END = ... # type: Any
|
||||
TOKEN_RAW_BEGIN = ... # type: Any
|
||||
TOKEN_RAW_END = ... # type: Any
|
||||
TOKEN_COMMENT_BEGIN = ... # type: Any
|
||||
TOKEN_COMMENT_END = ... # type: Any
|
||||
TOKEN_COMMENT = ... # type: Any
|
||||
TOKEN_LINESTATEMENT_BEGIN = ... # type: Any
|
||||
TOKEN_LINESTATEMENT_END = ... # type: Any
|
||||
TOKEN_LINECOMMENT_BEGIN = ... # type: Any
|
||||
TOKEN_LINECOMMENT_END = ... # type: Any
|
||||
TOKEN_LINECOMMENT = ... # type: Any
|
||||
TOKEN_DATA = ... # type: Any
|
||||
TOKEN_INITIAL = ... # type: Any
|
||||
TOKEN_EOF = ... # type: Any
|
||||
operators = ... # type: Any
|
||||
reverse_operators = ... # type: Any
|
||||
operator_re = ... # type: Any
|
||||
ignored_tokens = ... # type: Any
|
||||
ignore_if_empty = ... # type: Any
|
||||
|
||||
def describe_token(token): ...
|
||||
def describe_token_expr(expr): ...
|
||||
def count_newlines(value): ...
|
||||
def compile_rules(environment): ...
|
||||
|
||||
class Failure:
|
||||
message = ... # type: Any
|
||||
error_class = ... # type: Any
|
||||
def __init__(self, message, cls: Any = ...) -> None: ...
|
||||
def __call__(self, lineno, filename): ...
|
||||
|
||||
class Token(tuple):
|
||||
lineno = ... # type: Any
|
||||
type = ... # type: Any
|
||||
value = ... # type: Any
|
||||
def __new__(cls, lineno, type, value): ...
|
||||
def test(self, expr): ...
|
||||
def test_any(self, *iterable): ...
|
||||
|
||||
class TokenStreamIterator:
|
||||
stream = ... # type: Any
|
||||
def __init__(self, stream) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
class TokenStream:
|
||||
name = ... # type: Any
|
||||
filename = ... # type: Any
|
||||
closed = ... # type: bool
|
||||
current = ... # type: Any
|
||||
def __init__(self, generator, name, filename) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __bool__(self): ...
|
||||
__nonzero__ = ... # type: Any
|
||||
eos = ... # type: Any
|
||||
def push(self, token): ...
|
||||
def look(self): ...
|
||||
def skip(self, n: int = ...): ...
|
||||
def next_if(self, expr): ...
|
||||
def skip_if(self, expr): ...
|
||||
def __next__(self): ...
|
||||
def close(self): ...
|
||||
def expect(self, expr): ...
|
||||
|
||||
def get_lexer(environment): ...
|
||||
|
||||
class Lexer:
|
||||
newline_sequence = ... # type: Any
|
||||
keep_trailing_newline = ... # type: Any
|
||||
rules = ... # type: Any
|
||||
def __init__(self, environment) -> None: ...
|
||||
def tokenize(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., state: Optional[Any] = ...): ...
|
||||
def wrap(self, stream, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
|
||||
def tokeniter(self, source, name, filename: Optional[Any] = ..., state: Optional[Any] = ...): ...
|
||||
74
third_party/2and3/jinja2/loaders.pyi
vendored
Normal file
74
third_party/2and3/jinja2/loaders.pyi
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
# Stubs for jinja2.loaders (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Callable, List, Optional, Text, Tuple
|
||||
from types import ModuleType
|
||||
|
||||
from .environment import Environment
|
||||
|
||||
def split_template_path(template: Text) -> List[Text]: ...
|
||||
|
||||
class BaseLoader:
|
||||
has_source_access = ... # type: bool
|
||||
def get_source(self, environment, template): ...
|
||||
def list_templates(self): ...
|
||||
def load(self, environment, name, globals: Optional[Any] = ...): ...
|
||||
|
||||
class FileSystemLoader(BaseLoader):
|
||||
searchpath = ... # type: Text
|
||||
encoding = ... # type: Any
|
||||
followlinks = ... # type: Any
|
||||
def __init__(self, searchpath: Text, encoding: Text = ..., followlinks: bool = ...) -> None: ...
|
||||
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable]: ...
|
||||
def list_templates(self): ...
|
||||
|
||||
class PackageLoader(BaseLoader):
|
||||
encoding = ... # type: Text
|
||||
manager = ... # type: Any
|
||||
filesystem_bound = ... # type: Any
|
||||
provider = ... # type: Any
|
||||
package_path = ... # type: Any
|
||||
def __init__(self, package_name: Text, package_path: Text = ..., encoding: Text = ...) -> None: ...
|
||||
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable]: ...
|
||||
def list_templates(self): ...
|
||||
|
||||
class DictLoader(BaseLoader):
|
||||
mapping = ... # type: Any
|
||||
def __init__(self, mapping) -> None: ...
|
||||
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable]: ...
|
||||
def list_templates(self): ...
|
||||
|
||||
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]: ...
|
||||
|
||||
class PrefixLoader(BaseLoader):
|
||||
mapping = ... # type: Any
|
||||
delimiter = ... # type: Any
|
||||
def __init__(self, mapping, delimiter: str = ...) -> None: ...
|
||||
def get_loader(self, template): ...
|
||||
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable]: ...
|
||||
def load(self, environment, name, globals: Optional[Any] = ...): ...
|
||||
def list_templates(self): ...
|
||||
|
||||
class ChoiceLoader(BaseLoader):
|
||||
loaders = ... # type: Any
|
||||
def __init__(self, loaders) -> None: ...
|
||||
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable]: ...
|
||||
def load(self, environment, name, globals: Optional[Any] = ...): ...
|
||||
def list_templates(self): ...
|
||||
|
||||
class _TemplateModule(ModuleType): ...
|
||||
|
||||
class ModuleLoader(BaseLoader):
|
||||
has_source_access = ... # type: bool
|
||||
module = ... # type: Any
|
||||
package_name = ... # type: Any
|
||||
def __init__(self, path) -> None: ...
|
||||
@staticmethod
|
||||
def get_template_key(name): ...
|
||||
@staticmethod
|
||||
def get_module_filename(name): ...
|
||||
def load(self, environment, name, globals: Optional[Any] = ...): ...
|
||||
15
third_party/2and3/jinja2/meta.pyi
vendored
Normal file
15
third_party/2and3/jinja2/meta.pyi
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Stubs for jinja2.meta (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from jinja2.compiler import CodeGenerator
|
||||
|
||||
class TrackingCodeGenerator(CodeGenerator):
|
||||
undeclared_identifiers = ... # type: Any
|
||||
def __init__(self, environment) -> None: ...
|
||||
def write(self, x): ...
|
||||
def pull_locals(self, frame): ...
|
||||
|
||||
def find_undeclared_variables(ast): ...
|
||||
def find_referenced_templates(ast): ...
|
||||
254
third_party/2and3/jinja2/nodes.pyi
vendored
Normal file
254
third_party/2and3/jinja2/nodes.pyi
vendored
Normal file
@@ -0,0 +1,254 @@
|
||||
# Stubs for jinja2.nodes (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
class Impossible(Exception): ...
|
||||
|
||||
class NodeType(type):
|
||||
def __new__(cls, name, bases, d): ...
|
||||
|
||||
class EvalContext:
|
||||
environment = ... # type: Any
|
||||
autoescape = ... # type: Any
|
||||
volatile = ... # type: bool
|
||||
def __init__(self, environment, template_name: Optional[Any] = ...) -> None: ...
|
||||
def save(self): ...
|
||||
def revert(self, old): ...
|
||||
|
||||
def get_eval_context(node, ctx): ...
|
||||
|
||||
class Node:
|
||||
fields = ... # type: Any
|
||||
attributes = ... # type: Any
|
||||
abstract = ... # type: bool
|
||||
def __init__(self, *fields, **attributes) -> None: ...
|
||||
def iter_fields(self, exclude: Optional[Any] = ..., only: Optional[Any] = ...): ...
|
||||
def iter_child_nodes(self, exclude: Optional[Any] = ..., only: Optional[Any] = ...): ...
|
||||
def find(self, node_type): ...
|
||||
def find_all(self, node_type): ...
|
||||
def set_ctx(self, ctx): ...
|
||||
def set_lineno(self, lineno, override: bool = ...): ...
|
||||
def set_environment(self, environment): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
__hash__ = ... # type: Any
|
||||
|
||||
class Stmt(Node):
|
||||
abstract = ... # type: bool
|
||||
|
||||
class Helper(Node):
|
||||
abstract = ... # type: bool
|
||||
|
||||
class Template(Node):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Output(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Extends(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class For(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class If(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Macro(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class CallBlock(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class FilterBlock(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Block(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Include(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Import(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class FromImport(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class ExprStmt(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Assign(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class AssignBlock(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Expr(Node):
|
||||
abstract = ... # type: bool
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
def can_assign(self): ...
|
||||
|
||||
class BinExpr(Expr):
|
||||
fields = ... # type: Any
|
||||
operator = ... # type: Any
|
||||
abstract = ... # type: bool
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class UnaryExpr(Expr):
|
||||
fields = ... # type: Any
|
||||
operator = ... # type: Any
|
||||
abstract = ... # type: bool
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Name(Expr):
|
||||
fields = ... # type: Any
|
||||
def can_assign(self): ...
|
||||
|
||||
class Literal(Expr):
|
||||
abstract = ... # type: bool
|
||||
|
||||
class Const(Literal):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
@classmethod
|
||||
def from_untrusted(cls, value, lineno: Optional[Any] = ..., environment: Optional[Any] = ...): ...
|
||||
|
||||
class TemplateData(Literal):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Tuple(Literal):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
def can_assign(self): ...
|
||||
|
||||
class List(Literal):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Dict(Literal):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Pair(Helper):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Keyword(Helper):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class CondExpr(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Filter(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Test(Expr):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Call(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Getitem(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
def can_assign(self): ...
|
||||
|
||||
class Getattr(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
def can_assign(self): ...
|
||||
|
||||
class Slice(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Concat(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Compare(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Operand(Helper):
|
||||
fields = ... # type: Any
|
||||
|
||||
class Mul(BinExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class Div(BinExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class FloorDiv(BinExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class Add(BinExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class Sub(BinExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class Mod(BinExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class Pow(BinExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class And(BinExpr):
|
||||
operator = ... # type: str
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Or(BinExpr):
|
||||
operator = ... # type: str
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class Not(UnaryExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class Neg(UnaryExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class Pos(UnaryExpr):
|
||||
operator = ... # type: str
|
||||
|
||||
class EnvironmentAttribute(Expr):
|
||||
fields = ... # type: Any
|
||||
|
||||
class ExtensionAttribute(Expr):
|
||||
fields = ... # type: Any
|
||||
|
||||
class ImportedName(Expr):
|
||||
fields = ... # type: Any
|
||||
|
||||
class InternalName(Expr):
|
||||
fields = ... # type: Any
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class MarkSafe(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class MarkSafeIfAutoescape(Expr):
|
||||
fields = ... # type: Any
|
||||
def as_const(self, eval_ctx: Optional[Any] = ...): ...
|
||||
|
||||
class ContextReference(Expr): ...
|
||||
class Continue(Stmt): ...
|
||||
class Break(Stmt): ...
|
||||
|
||||
class Scope(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class EvalContextModifier(Stmt):
|
||||
fields = ... # type: Any
|
||||
|
||||
class ScopedEvalContextModifier(EvalContextModifier):
|
||||
fields = ... # type: Any
|
||||
33
third_party/2and3/jinja2/optimizer.pyi
vendored
Normal file
33
third_party/2and3/jinja2/optimizer.pyi
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# Stubs for jinja2.optimizer (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from jinja2.visitor import NodeTransformer
|
||||
|
||||
def optimize(node, environment): ...
|
||||
|
||||
class Optimizer(NodeTransformer):
|
||||
environment = ... # type: Any
|
||||
def __init__(self, environment) -> None: ...
|
||||
def visit_If(self, node): ...
|
||||
def fold(self, node): ...
|
||||
visit_Add = ... # type: Any
|
||||
visit_Sub = ... # type: Any
|
||||
visit_Mul = ... # type: Any
|
||||
visit_Div = ... # type: Any
|
||||
visit_FloorDiv = ... # type: Any
|
||||
visit_Pow = ... # type: Any
|
||||
visit_Mod = ... # type: Any
|
||||
visit_And = ... # type: Any
|
||||
visit_Or = ... # type: Any
|
||||
visit_Pos = ... # type: Any
|
||||
visit_Neg = ... # type: Any
|
||||
visit_Not = ... # type: Any
|
||||
visit_Compare = ... # type: Any
|
||||
visit_Getitem = ... # type: Any
|
||||
visit_Getattr = ... # type: Any
|
||||
visit_Call = ... # type: Any
|
||||
visit_Filter = ... # type: Any
|
||||
visit_Test = ... # type: Any
|
||||
visit_CondExpr = ... # type: Any
|
||||
64
third_party/2and3/jinja2/parser.pyi
vendored
Normal file
64
third_party/2and3/jinja2/parser.pyi
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
# Stubs for jinja2.parser (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
class Parser:
|
||||
environment = ... # type: Any
|
||||
stream = ... # type: Any
|
||||
name = ... # type: Any
|
||||
filename = ... # type: Any
|
||||
closed = ... # type: bool
|
||||
extensions = ... # type: Any
|
||||
def __init__(self, environment, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., state: Optional[Any] = ...) -> None: ...
|
||||
def fail(self, msg, lineno: Optional[Any] = ..., exc: Any = ...): ...
|
||||
def fail_unknown_tag(self, name, lineno: Optional[Any] = ...): ...
|
||||
def fail_eof(self, end_tokens: Optional[Any] = ..., lineno: Optional[Any] = ...): ...
|
||||
def is_tuple_end(self, extra_end_rules: Optional[Any] = ...): ...
|
||||
def free_identifier(self, lineno: Optional[Any] = ...): ...
|
||||
def parse_statement(self): ...
|
||||
def parse_statements(self, end_tokens, drop_needle: bool = ...): ...
|
||||
def parse_set(self): ...
|
||||
def parse_for(self): ...
|
||||
def parse_if(self): ...
|
||||
def parse_block(self): ...
|
||||
def parse_extends(self): ...
|
||||
def parse_import_context(self, node, default): ...
|
||||
def parse_include(self): ...
|
||||
def parse_import(self): ...
|
||||
def parse_from(self): ...
|
||||
def parse_signature(self, node): ...
|
||||
def parse_call_block(self): ...
|
||||
def parse_filter_block(self): ...
|
||||
def parse_macro(self): ...
|
||||
def parse_print(self): ...
|
||||
def parse_assign_target(self, with_tuple: bool = ..., name_only: bool = ..., extra_end_rules: Optional[Any] = ...): ...
|
||||
def parse_expression(self, with_condexpr: bool = ...): ...
|
||||
def parse_condexpr(self): ...
|
||||
def parse_or(self): ...
|
||||
def parse_and(self): ...
|
||||
def parse_not(self): ...
|
||||
def parse_compare(self): ...
|
||||
def parse_add(self): ...
|
||||
def parse_sub(self): ...
|
||||
def parse_concat(self): ...
|
||||
def parse_mul(self): ...
|
||||
def parse_div(self): ...
|
||||
def parse_floordiv(self): ...
|
||||
def parse_mod(self): ...
|
||||
def parse_pow(self): ...
|
||||
def parse_unary(self, with_filter: bool = ...): ...
|
||||
def parse_primary(self): ...
|
||||
def parse_tuple(self, simplified: bool = ..., with_condexpr: bool = ..., extra_end_rules: Optional[Any] = ..., explicit_parentheses: bool = ...): ...
|
||||
def parse_list(self): ...
|
||||
def parse_dict(self): ...
|
||||
def parse_postfix(self, node): ...
|
||||
def parse_filter_expr(self, node): ...
|
||||
def parse_subscript(self, node): ...
|
||||
def parse_subscribed(self): ...
|
||||
def parse_call(self, node): ...
|
||||
def parse_filter(self, node, start_inline: bool = ...): ...
|
||||
def parse_test(self, node): ...
|
||||
def subparse(self, end_tokens: Optional[Any] = ...): ...
|
||||
def parse(self): ...
|
||||
134
third_party/2and3/jinja2/runtime.pyi
vendored
Normal file
134
third_party/2and3/jinja2/runtime.pyi
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
# Stubs for jinja2.runtime (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Dict, Optional, Text, Union
|
||||
from jinja2.utils import Markup as Markup, escape as escape, missing as missing, concat as concat
|
||||
from jinja2.exceptions import TemplateRuntimeError as TemplateRuntimeError, TemplateNotFound as TemplateNotFound
|
||||
|
||||
from jinja2.environment import Environment
|
||||
|
||||
to_string = ... # type: Any
|
||||
identity = ... # type: Any
|
||||
|
||||
def markup_join(seq): ...
|
||||
def unicode_join(seq): ...
|
||||
|
||||
class TemplateReference:
|
||||
def __init__(self, context) -> None: ...
|
||||
def __getitem__(self, name): ...
|
||||
|
||||
class Context:
|
||||
parent = ... # type: Union[Context, Dict[str, Any]]
|
||||
vars = ... # type: Dict[str, Any]
|
||||
environment = ... # type: Environment
|
||||
eval_ctx = ... # type: Any
|
||||
exported_vars = ... # type: Any
|
||||
name = ... # type: Text
|
||||
blocks = ... # type: Dict[str, Any]
|
||||
def __init__(self, environment: Environment, parent: Union[Context, Dict[str, Any]], name: Text, blocks: Dict[str, Any]) -> None: ...
|
||||
def super(self, name, current): ...
|
||||
def get(self, key, default: Optional[Any] = ...): ...
|
||||
def resolve(self, key): ...
|
||||
def get_exported(self): ...
|
||||
def get_all(self): ...
|
||||
def call(__self, __obj, *args, **kwargs): ...
|
||||
def derived(self, locals: Optional[Any] = ...): ...
|
||||
keys = ... # type: Any
|
||||
values = ... # type: Any
|
||||
items = ... # type: Any
|
||||
iterkeys = ... # type: Any
|
||||
itervalues = ... # type: Any
|
||||
iteritems = ... # type: Any
|
||||
def __contains__(self, name): ...
|
||||
def __getitem__(self, key): ...
|
||||
|
||||
class BlockReference:
|
||||
name = ... # type: Any
|
||||
def __init__(self, name, context, stack, depth) -> None: ...
|
||||
@property
|
||||
def super(self): ...
|
||||
def __call__(self): ...
|
||||
|
||||
class LoopContext:
|
||||
index0 = ... # type: int
|
||||
depth0 = ... # type: Any
|
||||
def __init__(self, iterable, recurse: Optional[Any] = ..., depth0: int = ...) -> None: ...
|
||||
def cycle(self, *args): ...
|
||||
first = ... # type: Any
|
||||
last = ... # type: Any
|
||||
index = ... # type: Any
|
||||
revindex = ... # type: Any
|
||||
revindex0 = ... # type: Any
|
||||
depth = ... # type: Any
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def loop(self, iterable): ...
|
||||
__call__ = ... # type: Any
|
||||
@property
|
||||
def length(self): ...
|
||||
|
||||
class LoopContextIterator:
|
||||
context = ... # type: Any
|
||||
def __init__(self, context) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
class Macro:
|
||||
name = ... # type: Any
|
||||
arguments = ... # type: Any
|
||||
defaults = ... # type: Any
|
||||
catch_kwargs = ... # type: Any
|
||||
catch_varargs = ... # type: Any
|
||||
caller = ... # type: Any
|
||||
def __init__(self, environment, func, name, arguments, defaults, catch_kwargs, catch_varargs, caller) -> None: ...
|
||||
def __call__(self, *args, **kwargs): ...
|
||||
|
||||
class Undefined:
|
||||
def __init__(self, hint: Optional[Any] = ..., obj: Any = ..., name: Optional[Any] = ..., exc: Any = ...) -> None: ...
|
||||
def __getattr__(self, name): ...
|
||||
__add__ = ... # type: Any
|
||||
__radd__ = ... # type: Any
|
||||
__mul__ = ... # type: Any
|
||||
__rmul__ = ... # type: Any
|
||||
__div__ = ... # type: Any
|
||||
__rdiv__ = ... # type: Any
|
||||
__truediv__ = ... # type: Any
|
||||
__rtruediv__ = ... # type: Any
|
||||
__floordiv__ = ... # type: Any
|
||||
__rfloordiv__ = ... # type: Any
|
||||
__mod__ = ... # type: Any
|
||||
__rmod__ = ... # type: Any
|
||||
__pos__ = ... # type: Any
|
||||
__neg__ = ... # type: Any
|
||||
__call__ = ... # type: Any
|
||||
__getitem__ = ... # type: Any
|
||||
__lt__ = ... # type: Any
|
||||
__le__ = ... # type: Any
|
||||
__gt__ = ... # type: Any
|
||||
__ge__ = ... # type: Any
|
||||
__int__ = ... # type: Any
|
||||
__float__ = ... # type: Any
|
||||
__complex__ = ... # type: Any
|
||||
__pow__ = ... # type: Any
|
||||
__rpow__ = ... # type: Any
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
__bool__ = ... # type: Any
|
||||
|
||||
def make_logging_undefined(logger: Optional[Any] = ..., base: Optional[Any] = ...): ...
|
||||
|
||||
class DebugUndefined(Undefined): ...
|
||||
|
||||
class StrictUndefined(Undefined):
|
||||
__iter__ = ... # type: Any
|
||||
__len__ = ... # type: Any
|
||||
__nonzero__ = ... # type: Any
|
||||
__eq__ = ... # type: Any
|
||||
__ne__ = ... # type: Any
|
||||
__bool__ = ... # type: Any
|
||||
__hash__ = ... # type: Any
|
||||
38
third_party/2and3/jinja2/sandbox.pyi
vendored
Normal file
38
third_party/2and3/jinja2/sandbox.pyi
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# Stubs for jinja2.sandbox (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from jinja2.environment import Environment
|
||||
|
||||
MAX_RANGE = ... # type: int
|
||||
UNSAFE_FUNCTION_ATTRIBUTES = ... # type: Any
|
||||
UNSAFE_METHOD_ATTRIBUTES = ... # type: Any
|
||||
UNSAFE_GENERATOR_ATTRIBUTES = ... # type: Any
|
||||
|
||||
def safe_range(*args): ...
|
||||
def unsafe(f): ...
|
||||
def is_internal_attribute(obj, attr): ...
|
||||
def modifies_known_mutable(obj, attr): ...
|
||||
|
||||
class SandboxedEnvironment(Environment):
|
||||
sandboxed = ... # type: bool
|
||||
default_binop_table = ... # type: Any
|
||||
default_unop_table = ... # type: Any
|
||||
intercepted_binops = ... # type: Any
|
||||
intercepted_unops = ... # type: Any
|
||||
def intercept_unop(self, operator): ...
|
||||
binop_table = ... # type: Any
|
||||
unop_table = ... # type: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def is_safe_attribute(self, obj, attr, value): ...
|
||||
def is_safe_callable(self, obj): ...
|
||||
def call_binop(self, context, operator, left, right): ...
|
||||
def call_unop(self, context, operator, arg): ...
|
||||
def getitem(self, obj, argument): ...
|
||||
def getattr(self, obj, attribute): ...
|
||||
def unsafe_undefined(self, obj, attribute): ...
|
||||
def call(__self, __context, __obj, *args, **kwargs): ...
|
||||
|
||||
class ImmutableSandboxedEnvironment(SandboxedEnvironment):
|
||||
def is_safe_attribute(self, obj, attr, value): ...
|
||||
28
third_party/2and3/jinja2/tests.pyi
vendored
Normal file
28
third_party/2and3/jinja2/tests.pyi
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Stubs for jinja2.tests (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
number_re = ... # type: Any
|
||||
regex_type = ... # type: Any
|
||||
test_callable = ... # type: Any
|
||||
|
||||
def test_odd(value): ...
|
||||
def test_even(value): ...
|
||||
def test_divisibleby(value, num): ...
|
||||
def test_defined(value): ...
|
||||
def test_undefined(value): ...
|
||||
def test_none(value): ...
|
||||
def test_lower(value): ...
|
||||
def test_upper(value): ...
|
||||
def test_string(value): ...
|
||||
def test_mapping(value): ...
|
||||
def test_number(value): ...
|
||||
def test_sequence(value): ...
|
||||
def test_equalto(value, other): ...
|
||||
def test_sameas(value, other): ...
|
||||
def test_iterable(value): ...
|
||||
def test_escaped(value): ...
|
||||
|
||||
TESTS = ... # type: Any
|
||||
64
third_party/2and3/jinja2/utils.pyi
vendored
Normal file
64
third_party/2and3/jinja2/utils.pyi
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
# Stubs for jinja2.utils (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
missing = ... # type: Any
|
||||
internal_code = ... # type: Any
|
||||
concat = ... # type: Any
|
||||
|
||||
def contextfunction(f): ...
|
||||
def evalcontextfunction(f): ...
|
||||
def environmentfunction(f): ...
|
||||
def internalcode(f): ...
|
||||
def is_undefined(obj): ...
|
||||
def consume(iterable): ...
|
||||
def clear_caches(): ...
|
||||
def import_string(import_name, silent: bool = ...): ...
|
||||
def open_if_exists(filename, mode: str = ...): ...
|
||||
def object_type_repr(obj): ...
|
||||
def pformat(obj, verbose: bool = ...): ...
|
||||
def urlize(text, trim_url_limit: Optional[Any] = ..., nofollow: bool = ..., target: Optional[Any] = ...): ...
|
||||
def generate_lorem_ipsum(n: int = ..., html: bool = ..., min: int = ..., max: int = ...): ...
|
||||
def unicode_urlencode(obj, charset: str = ..., for_qs: bool = ...): ...
|
||||
|
||||
class LRUCache:
|
||||
capacity = ... # type: Any
|
||||
def __init__(self, capacity) -> None: ...
|
||||
def __getnewargs__(self): ...
|
||||
def copy(self): ...
|
||||
def get(self, key, default: Optional[Any] = ...): ...
|
||||
def setdefault(self, key, default: Optional[Any] = ...): ...
|
||||
def clear(self): ...
|
||||
def __contains__(self, key): ...
|
||||
def __len__(self): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __setitem__(self, key, value): ...
|
||||
def __delitem__(self, key): ...
|
||||
def items(self): ...
|
||||
def iteritems(self): ...
|
||||
def values(self): ...
|
||||
def itervalue(self): ...
|
||||
def keys(self): ...
|
||||
def iterkeys(self): ...
|
||||
__iter__ = ... # type: Any
|
||||
def __reversed__(self): ...
|
||||
__copy__ = ... # type: Any
|
||||
|
||||
class Cycler:
|
||||
items = ... # type: Any
|
||||
def __init__(self, *items) -> None: ...
|
||||
pos = ... # type: int
|
||||
def reset(self): ...
|
||||
@property
|
||||
def current(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
class Joiner:
|
||||
sep = ... # type: Any
|
||||
used = ... # type: bool
|
||||
def __init__(self, sep: str = ...) -> None: ...
|
||||
def __call__(self): ...
|
||||
|
||||
from markupsafe import Markup, escape, soft_unicode
|
||||
12
third_party/2and3/jinja2/visitor.pyi
vendored
Normal file
12
third_party/2and3/jinja2/visitor.pyi
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Stubs for jinja2.visitor (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
class NodeVisitor:
|
||||
def get_visitor(self, node): ...
|
||||
def visit(self, node, *args, **kwargs): ...
|
||||
def generic_visit(self, node, *args, **kwargs): ...
|
||||
|
||||
class NodeTransformer(NodeVisitor):
|
||||
def generic_visit(self, node, *args, **kwargs): ...
|
||||
def visit_list(self, node, *args, **kwargs): ...
|
||||
Reference in New Issue
Block a user