refactor: add type hints to get_boot_translations

This commit is contained in:
Shrihari Mahabal 2026-03-17 20:13:27 +05:30
parent 9ef5aa256b
commit a574651acc

View file

@ -133,7 +133,7 @@ def get_messages_for_boot():
@frappe.whitelist(allow_guest=True, methods=["GET"])
def get_boot_translations(lang=None):
def get_boot_translations(lang: str | None = None) -> dict[str, str]:
"""Return all translations for the current user's language."""
frappe.local.response_headers["Cache-Control"] = "private, max-age=31536000"
return get_all_translations(lang or frappe.local.lang)