fix: use f-string with separator in switch operator error message (#13915)

\`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}'\`
This commit is contained in:
Ricardo-M-L
2026-04-03 16:49:28 +08:00
committed by GitHub
parent 21af67f6f9
commit 354108922b

View File

@@ -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 "Im weighing a few options and will pick the next step shortly."