From 10f2d5c94b8664528fc1717fa0cf923c9ab20e8d Mon Sep 17 00:00:00 2001
From: Boming Zhang <bomingzh@sjtu.edu.cn>
Date: Sun, 2 Mar 2025 14:35:03 -0500
Subject: [PATCH] style: rename

---
 joj3_config_generator/convert.py       | 10 +++-------
 joj3_config_generator/models/result.py |  2 +-
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/joj3_config_generator/convert.py b/joj3_config_generator/convert.py
index f388469..ebed91f 100644
--- a/joj3_config_generator/convert.py
+++ b/joj3_config_generator/convert.py
@@ -29,21 +29,17 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config:
         effective_unix_timestamp=int(task_conf.release.begin_time.timestamp()),
         actor_csv_path="/home/tt/.config/joj/students.csv",  # students.csv position
         max_total_score=repo_conf.max_total_score,
-        stage=result.Stage(
-            stages=[],
-            sandbox_token=repo_conf.sandbox_token,
-            post_stages=[],
-        ),
+        stage=result.Stage(sandbox_token=repo_conf.sandbox_token),
     )
 
     current_test = os.environ.get("PYTEST_CURRENT_TEST") is not None
     # Construct healthcheck stage
     if not repo_conf.force_skip_health_check_on_test or not current_test:
         result_conf.stage.stages.append(get_healthcheck_config(repo_conf))
-    stages: List[str] = []
+    cached: List[str] = []
     # Convert each stage in the task configuration
     for task_stage in task_conf.stages:
-        executor_with_config, stages = get_executor_with_config(task_stage, stages)
+        executor_with_config, cached = get_executor_with_config(task_stage, cached)
         conf_stage = get_conf_stage(task_stage, executor_with_config)
         conf_stage = fix_result_detail(task_stage, conf_stage)
         conf_stage = fix_dummy(task_stage, conf_stage)
diff --git a/joj3_config_generator/models/result.py b/joj3_config_generator/models/result.py
index ac3a005..9fdca9e 100644
--- a/joj3_config_generator/models/result.py
+++ b/joj3_config_generator/models/result.py
@@ -135,7 +135,7 @@ class Stage(BaseModel):
     output_path: str = Field(
         "/tmp/joj3_result.json", serialization_alias="outputPath"
     )  # nosec: B108
-    stages: List[StageDetail]
+    stages: List[StageDetail] = []
     pre_stages: List[StageDetail] = Field([], serialization_alias="preStages")
     post_stages: List[StageDetail] = Field([], serialization_alias="postStages")