From 311aff4d9c55e6d38f2988adf266582f50fdab1c Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Wed, 9 Oct 2024 04:52:01 -0400 Subject: [PATCH] fix: comment with summary --- joint_teapot/utils/joj3.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py index 62f48de..9245c0c 100644 --- a/joint_teapot/utils/joj3.py +++ b/joint_teapot/utils/joj3.py @@ -200,16 +200,14 @@ def generate_title_and_comment( force_quit = stage["force_quit"] if force_quit: comment += " - Failed" - single_case = len(stage["results"]) == 1 - if single_case: - comment += f" - Score: {stage['results'][0]['score']}" comment += "\n" for i, result in enumerate(stage["results"]): - if not single_case: - comment += f"### Case {i} - Score: {result['score']}\n" + comment += f"Case {i} - Score: {result['score']}\n" + comment += "
\n\n" if result["comment"].strip() != "": comment += f"{result['comment']}\n" total_score += result["score"] + comment += "
\n\n" comment += "\n" title = f"JOJ3 Result for {exercise_name} - Score: {total_score}" return title, comment