From 8d4ed228538b52b6c809fb3f2e1f0c97b5d620f1 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Sat, 1 Aug 2026 18:17:36 +0300 Subject: [PATCH] maint: remove template helpers orphaned by the payload removal json_safe and maybe_store_string were reachable only through collect_template_payload (removed in 055b256). Caught by re-running the orphan scan after that commit rather than assuming the first pass was final. Checked: 1 occurrence each repo-wide (grep -a), 0 refs in ComfyUI core/FunUI. Tests: 22 failed / 460 passed, identical to baseline. Co-Authored-By: Claude Opus 5 --- templates.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/templates.py b/templates.py index 9ebd7059..31f92e0b 100644 --- a/templates.py +++ b/templates.py @@ -1005,18 +1005,8 @@ def now_iso(): return datetime.now(timezone.utc).replace(microsecond=0).isoformat() -def json_safe(value): - try: - return json.loads(json.dumps(value)) - except (TypeError, ValueError): - return copy.deepcopy(value) -def maybe_store_string(template, field, value, update_only): - if isinstance(value, str) and value.strip(): - template[field] = value - elif not update_only: - template.pop(field, None)