linted code

This commit is contained in:
Lorenzo Venerandi
2026-02-17 13:13:06 +01:00
parent 2c7b612587
commit c023d808c6
8 changed files with 65 additions and 34 deletions

View File

@@ -24,9 +24,7 @@ def get_templates() -> Jinja2Templates:
"""Get shared Jinja2Templates instance with custom filters."""
global _templates
if _templates is None:
templates_dir = os.path.join(
os.path.dirname(__file__), "templates", "jinja2"
)
templates_dir = os.path.join(os.path.dirname(__file__), "templates", "jinja2")
_templates = Jinja2Templates(directory=templates_dir)
_templates.env.filters["format_ts"] = _format_ts
return _templates
@@ -92,4 +90,4 @@ def build_raw_request(request: Request, body: str = "") -> str:
return raw
except Exception as e:
return f"{request.method} {request.url.path} (error building full request: {str(e)})"
return f"{request.method} {request.url.path} (error building full request: {str(e)})"