MCPcopy Create free account
hub / github.com/nodejs/node / load

Method load

deps/v8/third_party/jinja2/loaders.py:514–526  ·  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

512
513 @internalcode
514 def load(
515 self,
516 environment: "Environment",
517 name: str,
518 globals: t.Optional[t.MutableMapping[str, t.Any]] = None,
519 ) -> "Template":
520 loader, local_name = self.get_loader(name)
521 try:
522 return loader.load(environment, local_name, globals)
523 except TemplateNotFound as e:
524 # re-raise the exception with the correct filename here.
525 # (the one that includes the prefix)
526 raise TemplateNotFound(name) from e
527
528 def list_templates(self) -> t.List[str]:
529 result = []

Callers

nothing calls this directly

Calls 3

get_loaderMethod · 0.95
TemplateNotFoundClass · 0.70
loadMethod · 0.45

Tested by

no test coverage detected