Files
wehub-resource-sync 4e0f4422d0
build-docs / deploy (push) Has been cancelled
Check Markdown links / markdown-link-check (push) Has been cancelled
Pytest / test (3.11) (push) Has been cancelled
Pytest / test (3.12) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:25:42 +08:00

15 lines
510 B
Python

from sweagent.utils.log import get_logger
def _warn_probably_wrong_jinja_syntax(template: str | None) -> None:
"""Warn if the template uses {var} instead of {{var}}."""
if template is None:
return
if "{" not in template:
return
for s in ["{%", "{ %", "{{"]:
if s in template:
return
logger = get_logger("swea-config", emoji="🔧")
logger.warning("Probably wrong Jinja syntax in template: %s. Make sure to use {{var}} instead of {var}.", template)