From 54a4f404fe967fb37c616f9fde50cf0d0aacd422 Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Mon, 30 Jun 2025 08:09:07 -0400 Subject: [PATCH] fix: penalty for negative score --- joint_teapot/utils/joj3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py index a89a437..4e7d355 100644 --- a/joint_teapot/utils/joj3.py +++ b/joint_teapot/utils/joj3.py @@ -258,7 +258,7 @@ def generate_title_and_comment( total_score += result["score"] comment += "\n" if penalty_factor != 1.0: - total_score = round(total_score * penalty_factor) + total_score = round(total_score - abs(total_score) * (1 - penalty_factor)) title = get_title_prefix(exercise_name, submitter, submitter_in_title) if max_total_score >= 0: title += f"{total_score} / {max_total_score}"