From: Jérôme Benoit Date: Mon, 25 May 2026 12:01:55 +0000 (+0200) Subject: style(weights): use !r repr for strategy in compute_label_weights ValueError X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=66707084ba9d5d94108b90bc288f23a8f4fa35aa;p=freqai-strategies.git style(weights): use !r repr for strategy in compute_label_weights ValueError Replace hardcoded 'none' literal with f"{strategy!r}" to match the codebase convention of !r-formatting external string identifiers in error messages and avoid silent drift if WEIGHT_STRATEGIES[0] changes. --- diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 68d03d3..fdfb455 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -1193,7 +1193,7 @@ def compute_label_weights( if strategy == WEIGHT_STRATEGIES[0]: # "none" raise ValueError( - "compute_label_weights must not be called with strategy='none'; " + f"compute_label_weights must not be called with strategy={strategy!r}; " "callers must skip invocation when weighting is disabled" )