MCPcopy
hub / github.com/pallets/jinja / __call__

Method __call__

src/jinja2/environment.py:1567–1573  ·  view source on GitHub ↗
(self, *args: t.Any, **kwargs: t.Any)

Source from the content-addressed store, hash-verified

1565 self._undefined_to_none = undefined_to_none
1566
1567 def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Optional[t.Any]:
1568 context = self._template.new_context(dict(*args, **kwargs))
1569 consume(self._template.root_render_func(context))
1570 rv = context.vars["result"]
1571 if self._undefined_to_none and isinstance(rv, Undefined):
1572 rv = None
1573 return rv
1574
1575
1576class TemplateStream:

Callers

nothing calls this directly

Calls 2

consumeFunction · 0.85
new_contextMethod · 0.80

Tested by

no test coverage detected