From 354108922b7003381c3fb24fc93425d34323407b Mon Sep 17 00:00:00 2001 From: Ricardo-M-L <69202550+Ricardo-M-L@users.noreply.github.com> Date: Fri, 3 Apr 2026 16:49:28 +0800 Subject: [PATCH] fix: use f-string with separator in switch operator error message (#13915) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit \`switch.py\` line 137 concatenates the operator directly after the text without separator: \`'Not supported operator' + operator\` → produces \`"Not supported operatorXXX"\` Changed to: \`f'Not supported operator: {operator}'\` --- agent/component/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/component/switch.py b/agent/component/switch.py index 85e6cd03ba..cf9956bdf7 100644 --- a/agent/component/switch.py +++ b/agent/component/switch.py @@ -134,7 +134,7 @@ class Switch(ComponentBase, ABC): except Exception: return True if input <= value else False - raise ValueError('Not supported operator' + operator) + raise ValueError(f'Not supported operator: {operator}') def thoughts(self) -> str: return "I’m weighing a few options and will pick the next step shortly."