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

Method load

src/jinja2/loaders.py:596–607  ·  view source on GitHub ↗
(
        self,
        environment: "Environment",
        name: str,
        globals: t.Optional[t.MutableMapping[str, t.Any]] = None,
    )

Source from the content-addressed store, hash-verified

594
595 @internalcode
596 def load(
597 self,
598 environment: "Environment",
599 name: str,
600 globals: t.Optional[t.MutableMapping[str, t.Any]] = None,
601 ) -> "Template":
602 for loader in self.loaders:
603 try:
604 return loader.load(environment, name, globals)
605 except TemplateNotFound:
606 pass
607 raise TemplateNotFound(name)
608
609 def list_templates(self) -> t.List[str]:
610 found = set()

Callers

nothing calls this directly

Calls 2

TemplateNotFoundClass · 0.85
loadMethod · 0.45

Tested by

no test coverage detected