(
self,
environment: "Environment",
name: str,
globals: t.Optional[t.MutableMapping[str, t.Any]] = None,
)
| 544 | |
| 545 | @internalcode |
| 546 | def load( |
| 547 | self, |
| 548 | environment: "Environment", |
| 549 | name: str, |
| 550 | globals: t.Optional[t.MutableMapping[str, t.Any]] = None, |
| 551 | ) -> "Template": |
| 552 | loader, local_name = self.get_loader(name) |
| 553 | try: |
| 554 | return loader.load(environment, local_name, globals) |
| 555 | except TemplateNotFound as e: |
| 556 | # re-raise the exception with the correct filename here. |
| 557 | # (the one that includes the prefix) |
| 558 | raise TemplateNotFound(name) from e |
| 559 | |
| 560 | def list_templates(self) -> t.List[str]: |
| 561 | result = [] |
nothing calls this directly
no test coverage detected