From bc92b222c330f0ad88d6b818f61793d25bfb9a49 Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Tue, 1 Oct 2024 13:15:33 -0400 Subject: [PATCH] feat: sort score from low to high --- joint_teapot/utils/joj3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py index 4f1b7bf..f4612cf 100644 --- a/joint_teapot/utils/joj3.py +++ b/joint_teapot/utils/joj3.py @@ -87,8 +87,8 @@ def generate_scoreboard( columns.index("last_edit") ] = now # FIXME: Delete this in formal version - # Sort data by total - data.sort(key=lambda x: int(x[columns.index("total")]), reverse=True) + # Sort data by total, from low to high + data.sort(key=lambda x: int(x[columns.index("total")])) # Write back to the csv file: with open(scoreboard_file_path, mode="w", newline="") as file: