from jinja2_simple_tags import StandaloneTag
-from .static import TreeFileApp
+from .static import StaticTemplateFile, TreeFileApp
class StaticTag(StandaloneTag):
tags = {"static"}
@staticmethod
- def get_hubapp(static_file, hubapp):
+ def get_hubapp(
+ static_file: StaticTemplateFile, hubapp: str | TreeFileApp | None
+ ) -> TreeFileApp:
h = static_file.hubapp
if hubapp == "root":
return h.root
for line in fh:
if line.startswith(prefix):
return line[len(prefix) :].rstrip()
- return None
+ raise ValueError("No redis password found")