add ruff and pyright flake checks
This commit is contained in:
parent
42cf3f75dc
commit
7c9b42fe56
8 changed files with 125 additions and 19 deletions
|
|
@ -123,14 +123,14 @@ class PluginTemplateLoader(BaseLoader):
|
|||
self.macros = sync_read_file(base_path / "macros.html")
|
||||
|
||||
def get_source(
|
||||
self, environment: Any, name: str
|
||||
self, environment: Any, template: str
|
||||
) -> Tuple[str, str, Callable[[], bool]]:
|
||||
path = self.directory / f"{name}.html"
|
||||
path = self.directory / f"{template}.html"
|
||||
try:
|
||||
tpl = sync_read_file(path)
|
||||
except KeyError:
|
||||
raise TemplateNotFound(name)
|
||||
return self.macros + tpl, name, lambda: True
|
||||
raise TemplateNotFound(template)
|
||||
return self.macros + tpl, template, lambda: True
|
||||
|
||||
def list_templates(self) -> List[str]:
|
||||
return [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue