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

Method get_source

src/jinja2/loaders.py:491–502  ·  view source on GitHub ↗
(
        self, environment: "Environment", template: str
    )

Source from the content-addressed store, hash-verified

489 self.load_func = load_func
490
491 def get_source(
492 self, environment: "Environment", template: str
493 ) -> t.Tuple[str, t.Optional[str], t.Optional[t.Callable[[], bool]]]:
494 rv = self.load_func(template)
495
496 if rv is None:
497 raise TemplateNotFound(template)
498
499 if isinstance(rv, str):
500 return rv, None, None
501
502 return rv
503
504
505class PrefixLoader(BaseLoader):

Callers

nothing calls this directly

Calls 1

TemplateNotFoundClass · 0.85

Tested by

no test coverage detected