add ruff and pyright flake checks

This commit is contained in:
Abel Luck 2026-03-05 16:08:31 +01:00
parent 42cf3f75dc
commit 7c9b42fe56
8 changed files with 125 additions and 19 deletions

View file

@ -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 [