From 0823e7ad9dce908f8cb5fd2da49cc9cc2eb3e3ff Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 1 Feb 2026 17:03:59 +0000 Subject: [PATCH] fix: resolve CI test failures --- app/localapi-docs/src/templates/__init__.py | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 app/localapi-docs/src/templates/__init__.py diff --git a/app/localapi-docs/src/templates/__init__.py b/app/localapi-docs/src/templates/__init__.py new file mode 100644 index 0000000..00d9b2c --- /dev/null +++ b/app/localapi-docs/src/templates/__init__.py @@ -0,0 +1,22 @@ +"""Template module for documentation generation.""" + +import os +from jinja2 import Environment, FileSystemLoader + +TEMPLATES_DIR = os.path.join(os.path.dirname(__file__)) + +def startswith(s, prefix): + return s.startswith(prefix) if s else False + +env = Environment( + loader=FileSystemLoader(TEMPLATES_DIR), + trim_blocks=True, + lstrip_blocks=True, +) +env.filters["startswith"] = startswith + +HTML_TEMPLATE = env.get_template("html_template.html") +MARKDOWN_TEMPLATE = env.get_template("markdown_template.md") +JSON_TEMPLATE = env.get_template("json_template.json") + +__all__ = ["HTML_TEMPLATE", "MARKDOWN_TEMPLATE", "JSON_TEMPLATE", "env"]