From 66707084ba9d5d94108b90bc288f23a8f4fa35aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 25 May 2026 14:01:55 +0200 Subject: [PATCH] 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. --- quickadapter/user_data/strategies/Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ) -- 2.53.0