###__init__.py
###_identifier.py
###async_utils.py
###bccache.py
24:    class _MemcachedClient(te.Protocol):
29:class Bucket:
38:    def __init__(self, environment: 'Environment', key: str, checksum: str) -> None:
44:    def reset(self) -> None:
48:    def load_bytecode(self, f: t.BinaryIO) -> None:
52:    def write_bytecode(self, f: t.IO[bytes]) -> None:
56:    def bytecode_from_string(self, string: bytes) -> None:
60:    def bytecode_to_string(self) -> bytes:
64:class BytecodeCache:
93:    def load_bytecode(self, bucket: Bucket) -> None:
100:    def dump_bytecode(self, bucket: Bucket) -> None:
107:    def clear(self) -> None:
114:    def get_cache_key(self, name: str, filename: t.Optional[t.Union[str]]=None) -> str:
118:    def get_source_checksum(self, source: str) -> str:
122:    def get_bucket(self, environment: 'Environment', name: str, filename: t.Optional[str], source: str) -> Bucket:
128:    def set_bucket(self, bucket: Bucket) -> None:
132:class FileSystemBytecodeCache(BytecodeCache):
150:    def __init__(self, directory: t.Optional[str]=None, pattern: str='__jinja2_%s.cache') -> None:
156:class MemcachedBytecodeCache(BytecodeCache):
201:    def __init__(self, client: '_MemcachedClient', prefix: str='jinja2/bytecode/', timeout: t.Optional[int]=None, ignore_memcache_errors: bool=True):
###compiler.py
28:def generate(node: nodes.Template, environment: 'Environment', name: t.Optional[str], filename: t.Optional[str], stream: t.Optional[t.TextIO]=None, defer_init: bool=False, optimized: bool=True) -> t.Optional[str]:
32:def has_safe_repr(value: t.Any) -> bool:
36:def find_undeclared(nodes: t.Iterable[nodes.Node], names: t.Iterable[str]) -> t.Set[str]:
42:class MacroRef:
44:    def __init__(self, node: t.Union[nodes.Macro, nodes.CallBlock]) -> None:
50:class Frame:
53:    def __init__(self, eval_ctx: EvalContext, parent: t.Optional['Frame']=None, level: t.Optional[int]=None) -> None:
72:    def copy(self) -> 'Frame':
76:    def inner(self, isolated: bool=False) -> 'Frame':
80:    def soft(self) -> 'Frame':
91:class VisitorExit(RuntimeError):
94:class DependencyFinderVisitor(NodeVisitor):
97:    def __init__(self) -> None:
101:    def visit_Block(self, node: nodes.Block) -> None:
105:class UndeclaredNameVisitor(NodeVisitor):
111:    def __init__(self, names: t.Iterable[str]) -> None:
115:    def visit_Block(self, node: nodes.Block) -> None:
119:class CompilerExit(Exception):
125:class CodeGenerator(NodeVisitor):
127:    def __init__(self, environment: 'Environment', name: t.Optional[str], filename: t.Optional[str], stream: t.Optional[t.TextIO]=None, defer_init: bool=False, optimized: bool=True) -> None:
157:    def fail(self, msg: str, lineno: int) -> 'te.NoReturn':
161:    def temporary_identifier(self) -> str:
165:    def buffer(self, frame: Frame) -> None:
169:    def return_buffer_contents(self, frame: Frame, force_unescaped: bool=False) -> None:
173:    def indent(self) -> None:
177:    def outdent(self, step: int=1) -> None:
181:    def start_write(self, frame: Frame, node: t.Optional[nodes.Node]=None) -> None:
185:    def end_write(self, frame: Frame) -> None:
189:    def simple_write(self, s: str, frame: Frame, node: t.Optional[nodes.Node]=None) -> None:
193:    def blockvisit(self, nodes: t.Iterable[nodes.Node], frame: Frame) -> None:
199:    def write(self, x: str) -> None:
203:    def writeline(self, x: str, node: t.Optional[nodes.Node]=None, extra: int=0) -> None:
207:    def newline(self, node: t.Optional[nodes.Node]=None, extra: int=0) -> None:
211:    def signature(self, node: t.Union[nodes.Call, nodes.Filter, nodes.Test], frame: Frame, extra_kwargs: t.Optional[t.Mapping[str, t.Any]]=None) -> None:
220:    def pull_dependencies(self, nodes: t.Iterable[nodes.Node]) -> None:
233:    def macro_body(self, node: t.Union[nodes.Macro, nodes.CallBlock], frame: Frame) -> t.Tuple[Frame, MacroRef]:
237:    def macro_def(self, macro_ref: MacroRef, frame: Frame) -> None:
241:    def position(self, node: nodes.Node) -> str:
245:    def write_commons(self) -> None:
252:    def push_parameter_definitions(self, frame: Frame) -> None:
261:    def pop_parameter_definitions(self) -> None:
265:    def mark_parameter_stored(self, target: str) -> None:
271:    def parameter_is_undeclared(self, target: str) -> bool:
275:    def push_assign_tracking(self) -> None:
279:    def pop_assign_tracking(self, frame: Frame) -> None:
285:    def visit_Block(self, node: nodes.Block, frame: Frame) -> None:
289:    def visit_Extends(self, node: nodes.Extends, frame: Frame) -> None:
293:    def visit_Include(self, node: nodes.Include, frame: Frame) -> None:
297:    def visit_Import(self, node: nodes.Import, frame: Frame) -> None:
301:    def visit_FromImport(self, node: nodes.FromImport, frame: Frame) -> None:
305:    class _FinalizeInfo(t.NamedTuple):
310:    def _default_finalize(value: t.Any) -> t.Any:
318:    def _make_finalize(self) -> _FinalizeInfo:
333:    def _output_const_repr(self, group: t.Iterable[t.Any]) -> str:
340:    def _output_child_to_const(self, node: nodes.Expr, frame: Frame, finalize: _FinalizeInfo) -> str:
350:    def _output_child_pre(self, node: nodes.Expr, frame: Frame, finalize: _FinalizeInfo) -> None:
356:    def _output_child_post(self, node: nodes.Expr, frame: Frame, finalize: _FinalizeInfo) -> None:
###constants.py
###debug.py
11:def rewrite_traceback_stack(source: t.Optional[str]=None) -> BaseException:
24:def fake_traceback(exc_value: BaseException, tb: t.Optional[TracebackType], filename: str, lineno: int) -> TracebackType:
39:def get_template_locals(real_locals: t.Mapping[str, t.Any]) -> t.Dict[str, t.Any]:
###defaults.py
###environment.py
61:def get_spontaneous_environment(cls: t.Type[_env_bound], *args: t.Any) -> _env_bound:
71:def create_cache(size: int) -> t.Optional[t.MutableMapping[t.Tuple['weakref.ref[t.Any]', str], 'Template']]:
75:def copy_cache(cache: t.Optional[t.MutableMapping[t.Any, t.Any]]) -> t.Optional[t.MutableMapping[t.Tuple['weakref.ref[t.Any]', str], 'Template']]:
79:def load_extensions(environment: 'Environment', extensions: t.Sequence[t.Union[str, t.Type['Extension']]]) -> t.Dict[str, 'Extension']:
85:def _environment_config_check(environment: 'Environment') -> 'Environment':
89:class Environment:
219:    def __init__(self, block_start_string: str=BLOCK_START_STRING, block_end_string: str=BLOCK_END_STRING, variable_start_string: str=VARIABLE_START_STRING, variable_end_string: str=VARIABLE_END_STRING, comment_start_string: str=COMMENT_START_STRING, comment_end_string: str=COMMENT_END_STRING, line_statement_prefix: t.Optional[str]=LINE_STATEMENT_PREFIX, line_comment_prefix: t.Optional[str]=LINE_COMMENT_PREFIX, trim_blocks: bool=TRIM_BLOCKS, lstrip_blocks: bool=LSTRIP_BLOCKS, newline_sequence: "te.Literal['\\n', '\\r\\n', '\\r']"=NEWLINE_SEQUENCE, keep_trailing_newline: bool=KEEP_TRAILING_NEWLINE, extensions: t.Sequence[t.Union[str, t.Type['Extension']]]=(), optimized: bool=True, undefined: t.Type[Undefined]=Undefined, finalize: t.Optional[t.Callable[..., t.Any]]=None, autoescape: t.Union[bool, t.Callable[[t.Optional[str]], bool]]=False, loader: t.Optional['BaseLoader']=None, cache_size: int=400, auto_reload: bool=True, bytecode_cache: t.Optional['BytecodeCache']=None, enable_async: bool=False):
248:    def add_extension(self, extension: t.Union[str, t.Type['Extension']]) -> None:
255:    def extend(self, **attributes: t.Any) -> None:
262:    def overlay(self, block_start_string: str=missing, block_end_string: str=missing, variable_start_string: str=missing, variable_end_string: str=missing, comment_start_string: str=missing, comment_end_string: str=missing, line_statement_prefix: t.Optional[str]=missing, line_comment_prefix: t.Optional[str]=missing, trim_blocks: bool=missing, lstrip_blocks: bool=missing, newline_sequence: "te.Literal['\\n', '\\r\\n', '\\r']"=missing, keep_trailing_newline: bool=missing, extensions: t.Sequence[t.Union[str, t.Type['Extension']]]=missing, optimized: bool=missing, undefined: t.Type[Undefined]=missing, finalize: t.Optional[t.Callable[..., t.Any]]=missing, autoescape: t.Union[bool, t.Callable[[t.Optional[str]], bool]]=missing, loader: t.Optional['BaseLoader']=missing, cache_size: int=missing, auto_reload: bool=missing, bytecode_cache: t.Optional['BytecodeCache']=missing, enable_async: bool=False) -> 'Environment':
281:    def lexer(self) -> Lexer:
285:    def iter_extensions(self) -> t.Iterator['Extension']:
289:    def getitem(self, obj: t.Any, argument: t.Union[str, t.Any]) -> t.Union[t.Any, Undefined]:
293:    def getattr(self, obj: t.Any, attribute: str) -> t.Any:
299:    def call_filter(self, name: str, value: t.Any, args: t.Optional[t.Sequence[t.Any]]=None, kwargs: t.Optional[t.Mapping[str, t.Any]]=None, context: t.Optional[Context]=None, eval_ctx: t.Optional[EvalContext]=None) -> t.Any:
310:    def call_test(self, name: str, value: t.Any, args: t.Optional[t.Sequence[t.Any]]=None, kwargs: t.Optional[t.Mapping[str, t.Any]]=None, context: t.Optional[Context]=None, eval_ctx: t.Optional[EvalContext]=None) -> t.Any:
326:    def parse(self, source: str, name: t.Optional[str]=None, filename: t.Optional[str]=None) -> nodes.Template:
337:    def _parse(self, source: str, name: t.Optional[str], filename: t.Optional[str]) -> nodes.Template:
341:    def lex(self, source: str, name: t.Optional[str]=None, filename: t.Optional[str]=None) -> t.Iterator[t.Tuple[int, str, str]]:
353:    def preprocess(self, source: str, name: t.Optional[str]=None, filename: t.Optional[str]=None) -> str:
360:    def _tokenize(self, source: str, name: t.Optional[str], filename: t.Optional[str]=None, state: t.Optional[str]=None) -> TokenStream:
366:    def _generate(self, source: nodes.Template, name: t.Optional[str], filename: t.Optional[str], defer_init: bool=False) -> str:
374:    def _compile(self, source: str, filename: str) -> CodeType:
383:    def compile(self, source: t.Union[str, nodes.Template], name: t.Optional[str]=None, filename: t.Optional[str]=None, raw: bool=False, defer_init: bool=False) -> t.Union[str, CodeType]:
405:    def compile_expression(self, source: str, undefined_to_none: bool=True) -> 'TemplateExpression':
435:    def compile_templates(self, target: t.Union[str, 'os.PathLike[str]'], extensions: t.Optional[t.Collection[str]]=None, filter_func: t.Optional[t.Callable[[str], bool]]=None, zip: t.Optional[str]='deflated', log_function: t.Optional[t.Callable[[str], None]]=None, ignore_errors: bool=True) -> None:
455:    def list_templates(self, extensions: t.Optional[t.Collection[str]]=None, filter_func: t.Optional[t.Callable[[str], bool]]=None) -> t.List[str]:
473:    def handle_exception(self, source: t.Optional[str]=None) -> 'te.NoReturn':
479:    def join_path(self, template: str, parent: str) -> str:
492:    def get_template(self, name: t.Union[str, 'Template'], parent: t.Optional[str]=None, globals: t.Optional[t.MutableMapping[str, t.Any]]=None) -> 'Template':
519:    def select_template(self, names: t.Iterable[t.Union[str, 'Template']], parent: t.Optional[str]=None, globals: t.Optional[t.MutableMapping[str, t.Any]]=None) -> 'Template':
551:    def get_or_select_template(self, template_name_or_list: t.Union[str, 'Template', t.List[t.Union[str, 'Template']]], parent: t.Optional[str]=None, globals: t.Optional[t.MutableMapping[str, t.Any]]=None) -> 'Template':
559:    def from_string(self, source: t.Union[str, nodes.Template], globals: t.Optional[t.MutableMapping[str, t.Any]]=None, template_class: t.Optional[t.Type['Template']]=None) -> 'Template':
573:    def make_globals(self, d: t.Optional[t.MutableMapping[str, t.Any]]) -> t.MutableMapping[str, t.Any]:
590:class Template:
617:    def __new__(cls, source: t.Union[str, nodes.Template], block_start_string: str=BLOCK_START_STRING, block_end_string: str=BLOCK_END_STRING, variable_start_string: str=VARIABLE_START_STRING, variable_end_string: str=VARIABLE_END_STRING, comment_start_string: str=COMMENT_START_STRING, comment_end_string: str=COMMENT_END_STRING, line_statement_prefix: t.Optional[str]=LINE_STATEMENT_PREFIX, line_comment_prefix: t.Optional[str]=LINE_COMMENT_PREFIX, trim_blocks: bool=TRIM_BLOCKS, lstrip_blocks: bool=LSTRIP_BLOCKS, newline_sequence: "te.Literal['\\n', '\\r\\n', '\\r']"=NEWLINE_SEQUENCE, keep_trailing_newline: bool=KEEP_TRAILING_NEWLINE, extensions: t.Sequence[t.Union[str, t.Type['Extension']]]=(), optimized: bool=True, undefined: t.Type[Undefined]=Undefined, finalize: t.Optional[t.Callable[..., t.Any]]=None, autoescape: t.Union[bool, t.Callable[[t.Optional[str]], bool]]=False, enable_async: bool=False) -> t.Any:
622:    def from_code(cls, environment: Environment, code: CodeType, globals: t.MutableMapping[str, t.Any], uptodate: t.Optional[t.Callable[[], bool]]=None) -> 'Template':
629:    def from_module_dict(cls, environment: Environment, module_dict: t.MutableMapping[str, t.Any], globals: t.MutableMapping[str, t.Any]) -> 'Template':
637:    def render(self, *args: t.Any, **kwargs: t.Any) -> str:
649:    async def render_async(self, *args: t.Any, **kwargs: t.Any) -> str:
660:    def stream(self, *args: t.Any, **kwargs: t.Any) -> 'TemplateStream':
666:    def generate(self, *args: t.Any, **kwargs: t.Any) -> t.Iterator[str]:
676:    async def generate_async(self, *args: t.Any, **kwargs: t.Any) -> t.AsyncIterator[str]:
682:    def new_context(self, vars: t.Optional[t.Dict[str, t.Any]]=None, shared: bool=False, locals: t.Optional[t.Mapping[str, t.Any]]=None) -> Context:
692:    def make_module(self, vars: t.Optional[t.Dict[str, t.Any]]=None, shared: bool=False, locals: t.Optional[t.Mapping[str, t.Any]]=None) -> 'TemplateModule':
701:    async def make_module_async(self, vars: t.Optional[t.Dict[str, t.Any]]=None, shared: bool=False, locals: t.Optional[t.Mapping[str, t.Any]]=None) -> 'TemplateModule':
710:    def _get_default_module(self, ctx: t.Optional[Context]=None) -> 'TemplateModule':
725:    def module(self) -> 'TemplateModule':
740:    def get_corresponding_lineno(self, lineno: int) -> int:
747:    def is_up_to_date(self) -> bool:
752:    def debug_info(self) -> t.List[t.Tuple[int, int]]:
756:    def __repr__(self) -> str:
763:class TemplateModule:
769:    def __init__(self, template: Template, context: Context, body_stream: t.Optional[t.Iterable[str]]=None) -> None:
778:    def __html__(self) -> Markup:
781:    def __str__(self) -> str:
784:    def __repr__(self) -> str:
791:class TemplateExpression:
797:    def __init__(self, template: Template, undefined_to_none: bool) -> None:
801:    def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Optional[t.Any]:
809:class TemplateStream:
820:    def __init__(self, gen: t.Iterator[str]) -> None:
824:    def dump(self, fp: t.Union[str, t.IO[bytes]], encoding: t.Optional[str]=None, errors: t.Optional[str]='strict') -> None:
835:    def disable_buffering(self) -> None:
839:    def enable_buffering(self, size: int=5) -> None:
843:    def __iter__(self) -> 'TemplateStream':
846:    def __n<response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>, *fields: t.Any, **attributes: t.Any) -> None:
88:    def iter_fields(self, exclude: t.Optional[t.Container[str]]=None, only: t.Optional[t.Container[str]]=None) -> t.Iterator[t.Tuple[str, t.Any]]:
97:    def iter_child_nodes(self, exclude: t.Optional[t.Container[str]]=None, only: t.Optional[t.Container[str]]=None) -> t.Iterator['Node']:
104:    def find(self, node_type: t.Type[_NodeBound]) -> t.Optional[_NodeBound]:
110:    def find_all(self, node_type: t.Union[t.Type[_NodeBound], t.Tuple[t.Type[_NodeBound], ...]]) -> t.Iterator[_NodeBound]:
116:    def set_ctx(self, ctx: str) -> 'Node':
124:    def set_lineno(self, lineno: int, override: bool=False) -> 'Node':
128:    def set_environment(self, environment: 'Environment') -> 'Node':
132:    def __eq__(self, other: t.Any) -> bool:
138:    def __repr__(self) -> str:
142:class Stmt(Node):
146:class Helper(Node):
150:class Template(Node):
157:class Output(Stmt):
164:class Extends(Stmt):
169:class For(Stmt):
185:class If(Stmt):
193:class Macro(Stmt):
204:class CallBlock(Stmt):
214:class FilterBlock(Stmt):
220:class With(Stmt):
231:class Block(Stmt):
243:class Include(Stmt):
250:class Import(Stmt):
257:class FromImport(Stmt):
273:class ExprStmt(Stmt):
278:class Assign(Stmt):
284:class AssignBlock(Stmt):
291:class Expr(Node):
295:    def as_const(self, eval_ctx: t.Optional[EvalContext]=None) -> t.Any:
308:    def can_assign(self) -> bool:
312:class BinExpr(Expr):
320:class UnaryExpr(Expr):
327:class Name(Expr):
339:class NSRef(Expr):
345:class Literal(Expr):
349:class Const(Literal):
359:    def from_untrusted(cls, value: t.Any, lineno: t.Optional[int]=None, environment: 't.Optional[Environment]'=None) -> 'Const':
366:class TemplateData(Literal):
371:class Tuple(Literal):
380:class List(Literal):
385:class Dict(Literal):
392:class Pair(Helper):
398:class Keyword(Helper):
404:class CondExpr(Expr):
413:class _FilterTestCommon(Expr):
424:class Filter(_FilterTestCommon):
433:class Test(_FilterTestCommon):
444:class Call(Expr):
458:class Getitem(Expr):
465:class Getattr(Expr):
474:class Slice(Expr):
483:class Concat(Expr):
490:class Compare(Expr):
498:class Operand(Helper):
504:class Mul(BinExpr):
508:class Div(BinExpr):
512:class FloorDiv(BinExpr):
518:class Add(BinExpr):
522:class Sub(BinExpr):
526:class Mod(BinExpr):
530:class Pow(BinExpr):
534:class And(BinExpr):
538:class Or(BinExpr):
542:class Not(UnaryExpr):
546:class Neg(UnaryExpr):
550:class Pos(UnaryExpr):
554:class EnvironmentAttribute(Expr):
561:class ExtensionAttribute(Expr):
572:class ImportedName(Expr):
581:class InternalName(Expr):
591:    def __init__(self) -> None:
594:class MarkSafe(Expr):
599:class MarkSafeIfAutoescape(Expr):
608:class ContextReference(Expr):
625:class DerivedContextReference(Expr):
633:class Continue(Stmt):
636:class Break(Stmt):
639:class Scope(Stmt):
644:class OverlayScope(Stmt):
661:class EvalContextModifier(Stmt):
672:class ScopedEvalContextModifier(EvalContextModifier):
###optimizer.py
16:def optimize(node: nodes.Node, environment: 'Environment') -> nodes.Node:
21:class Optimizer(NodeTransformer):
23:    def __init__(self, environment: 't.Optional[Environment]') -> None:
###parser.py
18:class Parser:
23:    def __init__(self, environment: 'Environment', source: str, name: t.Optional[str]=None, filename: t.Optional[str]=None, state: t.Optional[str]=None) -> None:
37:    def fail(self, msg: str, lineno: t.Optional[int]=None, exc: t.Type[TemplateSyntaxError]=TemplateSyntaxError) -> 'te.NoReturn':
44:    def fail_unknown_tag(self, name: str, lineno: t.Optional[int]=None) -> 'te.NoReturn':
51:    def fail_eof(self, end_tokens: t.Optional[t.Tuple[str, ...]]=None, lineno: t.Optional[int]=None) -> 'te.NoReturn':
55:    def is_tuple_end(self, extra_end_rules: t.Optional[t.Tuple[str, ...]]=None) -> bool:
59:    def free_identifier(self, lineno: t.Optional[int]=None) -> nodes.InternalName:
63:    def parse_statement(self) -> t.Union[nodes.Node, t.List[nodes.Node]]:
67:    def parse_statements(self, end_tokens: t.Tuple[str, ...], drop_needle: bool=False) -> t.List[nodes.Node]:
79:    def parse_set(self) -> t.Union[nodes.Assign, nodes.AssignBlock]:
83:    def parse_for(self) -> nodes.For:
87:    def parse_if(self) -> nodes.If:
91:    def parse_assign_target(self, with_tuple: bool=True, name_only: bool=False, extra_end_rules: t.Optional[t.Tuple[str, ...]]=None, with_namespace: bool=False) -> t.Union[nodes.NSRef, nodes.Name, nodes.Tuple]:
102:    def parse_expression(self, with_condexpr: bool=True) -> nodes.Expr:
109:    def parse_tuple(self, simplified: bool=False, with_condexpr: bool=True, extra_end_rules: t.Optional[t.Tuple[str, ...]]=None, explicit_parentheses: bool=False) -> t.Union[nodes.Tuple, nodes.Expr]:
130:    def parse(self) -> nodes.Template:
###runtime.py
30:    class LoopRenderFunc(te.Protocol):
37:def identity(x: V) -> V:
43:def markup_join(seq: t.Iterable[t.Any]) -> str:
47:def str_join(seq: t.Iterable[t.Any]) -> str:
51:def new_context(environment: 'Environment', template_name: t.Optional[str], blocks: t.Dict[str, t.Callable[['Context'], t.Iterator[str]]], vars: t.Optional[t.Dict[str, t.Any]]=None, shared: bool=False, globals: t.Optional[t.MutableMapping[str, t.Any]]=None, locals: t.Optional[t.Mapping[str, t.Any]]=None) -> 'Context':
55:class TemplateReference:
58:    def __init__(self, context: 'Context') -> None:
61:    def __getitem__(self, name: str) -> t.Any:
65:    def __repr__(self) -> str:
69:class Context:
89:    def __init__(self, environment: 'Environment', parent: t.Dict[str, t.Any], name: t.Optional[str], blocks: t.Dict[str, t.Callable[['Context'], t.Iterator[str]]], globals: t.Optional[t.MutableMapping[str, t.Any]]=None):
99:    def super(self, name: str, current: t.Callable[['Context'], t.Iterator[str]]) -> t.Union['BlockReference', 'Undefined']:
103:    def get(self, key: str, default: t.Any=None) -> t.Any:
112:    def resolve(self, key: str) -> t.Union[t.Any, 'Undefined']:
124:    def resolve_or_missing(self, key: str) -> t.Any:
136:    def get_exported(self) -> t.Dict[str, t.Any]:
140:    def get_all(self) -> t.Dict[str, t.Any]:
148:    def call(__self, __obj: t.Callable[..., t.Any], *args: t.Any, **kwargs: t.Any) -> t.Union[t.Any, 'Undefined']:
156:    def derived(self, locals: t.Optional[t.Dict[str, t.Any]]=None) -> 'Context':
166:    def __contains__(self, name: str) -> bool:
169:    def __getitem__(self, key: str) -> t.Any:
178:    def __repr__(self) -> str:
181:class BlockReference:
184:    def __init__(self, name: str, context: 'Context', stack: t.List[t.Callable[['Context'], t.Iterator[str]]], depth: int) -> None:
191:    def super(self) -> t.Union['BlockReference', 'Undefined']:
196:    def __call__(self) -> str:
204:class LoopContext:
215:    def __init__(self, iterable: t.Iterable[V], undefined: t.Type['Undefined'], recurse: t.Optional['LoopRenderFunc']=None, depth0: int=0) -> None:
231:    def length(self) -> int:
239:    def __len__(self) -> int:
243:    def depth(self) -> int:
248:    def index(self) -> int:
253:    def revindex0(self) -> int:
261:    def revindex(self) -> int:
269:    def first(self) -> bool:
273:    def _peek_next(self) -> t.Any:
282:    def last(self) -> bool:
292:    def previtem(self) -> t.Union[t.Any, 'Undefined']:
299:    def nextitem(self) -> t.Union[t.Any, 'Undefined']:
309:    def cycle(self, *args: V) -> V:
317:    def changed(self, *value: t.Any) -> bool:
325:    def __iter__(self) -> 'LoopContext':
328:    def __next__(self) -> t.Tuple[t.Any, 'LoopContext']:
340:    def __call__(self, iterable: t.Iterable[V]) -> str:
350:    def __repr__(self) -> str:
353:class AsyncLoopContext(LoopContext):
356:    def __aiter__(self) -> 'AsyncLoopContext':
359:    async def __anext__(self) -> t.Tuple[t.Any, 'AsyncLoopContext']:
370:class Macro:
373:    def __init__(self, environment: 'Environment', func: t.Callable[..., str], name: str, arguments: t.List[str], catch_kwargs: bool, catch_varargs: bool, caller: bool, default_autoescape: t.Optional[bool]=None):
392:    def __call__(self, *args: t.Any, **kwargs: t.Any) -> str:
429:    def __repr__(self) -> str:
433:class Undefined:
449:    def __init__(self, hint: t.Optional[str]=None, obj: t.Any=missing, name: t.Optional[str]=None, exc: t.Type[TemplateRuntimeError]=UndefinedError) -> None:
456:    def _undefined_message(self) -> str:
463:    def _fail_with_undefined_error(self, *args: t.Any, **kwargs: t.Any) -> 'te.NoReturn':
470:    def __getattr__(self, name: str) -> t.Any:
485:    def __eq__(self, other: t.Any) -> bool:
488:    def __ne__(self, other: t.Any) -> bool:
491:    def __hash__(self) -> int:
494:    def __str__(self) -> str:
497:    def __len__(self) -> int:
500:    def __iter__(self) -> t.Iterator[t.Any]:
503:    async def __aiter__(self) -> t.AsyncIterator[t.Any]:
507:    def __bool__(self) -> bool:
510:    def __repr__(self) -> str:
513:def make_logging_undefined(logger: t.Optional['logging.Logger']=None, base: t.Type[Undefined]=Undefined) -> t.Type[Undefined]:
535:class ChainableUndefined(Undefined):
552:    def __html__(self) -> str:
555:    def __getattr__(self, _: str) -> 'ChainableUndefined':
559:class DebugUndefined(Undefined):
574:    def __str__(self) -> str:
583:class StrictUndefined(Undefined):
###sandbox.py
26:def safe_range(*args: int) -> range:
32:def unsafe(f: F) -> F:
43:def is_internal_attribute(obj: t.Any, attr: str) -> bool:
57:def modifies_known_mutable(obj: t.Any, attr: str) -> bool:
78:class SandboxedEnvironment(Environment):
94:    def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
100:    def is_safe_attribute(self, obj: t.Any, attr: str, value: t.Any) -> bool:
109:    def is_safe_callable(self, obj: t.Any) -> bool:
118:    def call_binop(self, context: Context, operator: str, left: t.Any, right: t.Any) -> t.Any:
127:    def call_unop(self, context: Context, operator: str, arg: t.Any) -> t.Any:
136:    def getitem(self, obj: t.Any, argument: t.Union[str, t.Any]) -> t.Union[t.Any, Undefined]:
140:    def getattr(self, obj: t.Any, attribute: str) -> t.Union[t.Any, Undefined]:
146:    def unsafe_undefined(self, obj: t.Any, attribute: str) -> Undefined:
150:    def format_string(self, s: str, args: t.Tuple[t.Any, ...], kwargs: t.Dict[str, t.Any], format_func: t.Optional[t.Callable[..., t.Any]]=None) -> str:
156:    def call(__self, __context: Context, __obj: t.Any, *args: t.Any, **kwargs: t.Any) -> t.Any:
160:class ImmutableSandboxedEnvironment(SandboxedEnvironment):
166:class SandboxedFormatter(Formatter):
168:    def __init__(self, env: Environment, **kwargs: t.Any) -> None:
172:class SandboxedEscapeFormatter(SandboxedFormatter, EscapeFormatter):
###tests.py
11:def test_odd(value: int) -> bool:
15:def test_even(value: int) -> bool:
19:def test_divisibleby(value: int, num: int) -> bool:
23:def test_defined(value: t.Any) -> bool:
39:def test_undefined(value: t.Any) -> bool:
44:def test_filter(env: 'Environment', value: str) -> bool:
61:def test_test(env: 'Environment', value: str) -> bool:
81:def test_none(value: t.Any) -> bool:
85:def test_boolean(value: t.Any) -> bool:
92:def test_false(value: t.Any) -> bool:
99:def test_true(value: t.Any) -> bool:
106:def test_integer(value: t.Any) -> bool:
113:def test_float(value: t.Any) -> bool:
120:def test_lower(value: str) -> bool:
124:def test_upper(value: str) -> bool:
128:def test_string(value: t.Any) -> bool:
132:def test_mapping(value: t.Any) -> bool:
139:def test_number(value: t.Any) -> bool:
143:def test_sequence(value: t.Any) -> bool:
149:def test_sameas(value: t.Any, other: t.Any) -> bool:
161:def test_iterable(value: t.Any) -> bool:
165:def test_escaped(value: t.Any) -> bool:
169:def test_in(value: t.Any, seq: t.Container[t.Any]) -> bool:
###utils.py
21:def pass_context(f: F) -> F:
36:def pass_eval_context(f: F) -> F:
51:def pass_environment(f: F) -> F:
62:class _PassArg(enum.Enum):
67:def internalcode(f: F) -> F:
71:def is_undefined(obj: t.Any) -> bool:
85:def consume(iterable: t.Iterable[t.Any]) -> None:
89:def clear_caches() -> None:
97:def import_string(import_name: str, silent: bool=False) -> t.Any:
110:def open_if_exists(filename: str, mode: str='rb') -> t.Optional[t.IO[t.Any]]:
116:def object_type_repr(obj: t.Any) -> str:
123:def pformat(obj: t.Any) -> str:
129:def urlize(text: str, trim_url_limit: t.Optional[int]=None, rel: t.Optional[str]=None, target: t.Optional[str]=None, extra_schemes: t.Optional[t.Iterable[str]]=None) -> str:
163:def generate_lorem_ipsum(n: int=5, html: bool=True, min: int=20, max: int=100) -> str:
167:def url_quote(obj: t.Any, charset: str='utf-8', for_qs: bool=False) -> str:
178:class LRUCache:
181:    def __init__(self, capacity: int) -> None:
187:    def __getstate__(self) -> t.Mapping[str, t.Any]:
190:    def __setstate__(self, d: t.Mapping[str, t.Any]) -> None:
194:    def __getnewargs__(self) -> t.Tuple[t.Any, ...]:
197:    def copy(self) -> 'LRUCache':
201:    def get(self, key: t.Any, default: t.Any=None) -> t.Any:
205:    def setdefault(self, key: t.Any, default: t.Any=None) -> t.Any:
211:    def clear(self) -> None:
215:    def __contains__(self, key: t.Any) -> bool:
219:    def __len__(self) -> int:
223:    def __repr__(self) -> str:
226:    def __getitem__(self, key: t.Any) -> t.Any:
242:    def __setitem__(self, key: t.Any, value: t.Any) -> None:
254:    def __delitem__(self, key: t.Any) -> None:
265:    def items(self) -> t.Iterable[t.Tuple[t.Any, t.Any]]:
269:    def values(self) -> t.Iterable[t.Any]:
273:    def keys(self) -> t.Iterable[t.Any]:
277:    def __iter__(self) -> t.Iterator[t.Any]:
280:    def __reversed__(self) -> t.Iterator[t.Any]:
287:def select_autoescape(enabled_extensions: t.Collection[str]=('html', 'htm', 'xml'), disabled_extensions: t.Collection[str]=(), default_for_string: bool=True, default: bool=False) -> t.Callable[[t.Optional[str]], bool]:
324:def htmlsafe_json_dumps(obj: t.Any, dumps: t.Optional[t.Callable[..., str]]=None, **kwargs: t.Any) -> markupsafe.Markup:
352:class Cycler:
378:    def __init__(self, *items: t.Any) -> None:
384:    def reset(self) -> None:
389:    def current(self) -> t.Any:
395:    def next(self) -> t.Any:
402:class Joiner:
405:    def __init__(self, sep: str=', ') -> None:
409:    def __call__(self) -> str:
415:class Namespace:
419:    def __init__(*args: t.Any, **kwargs: t.Any) -> None:
423:    def __getattribute__(self, name: str) -> t.Any:
431:    def __setitem__(self, name: str, value: t.Any) -> None:
434:    def __repr__(self) -> str:
###visitor.py
9:    class VisitCallable(te.Protocol):
14:class NodeVisitor:
20:    class name of the node.  So a `TryFinally` node visit function would
26:    def get_visitor(self, node: Node) -> 't.Optional[VisitCallable]':
33:    def visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any:
37:    def generic_visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any:
41:class NodeTransformer(NodeVisitor):
52:    def visit_list(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.List[Node]:
[The command completed with exit code 0.]
[Current working directory: /workspace/jinja]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 0]