style: rename
All checks were successful
build / build (push) Successful in 2m29s
build / build (pull_request) Successful in 2m28s

This commit is contained in:
张泊明518370910136 2025-03-02 14:35:03 -05:00
parent 5444debb92
commit 10f2d5c94b
GPG Key ID: D47306D7062CDA9D
2 changed files with 4 additions and 8 deletions

View File

@ -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()), effective_unix_timestamp=int(task_conf.release.begin_time.timestamp()),
actor_csv_path="/home/tt/.config/joj/students.csv", # students.csv position actor_csv_path="/home/tt/.config/joj/students.csv", # students.csv position
max_total_score=repo_conf.max_total_score, max_total_score=repo_conf.max_total_score,
stage=result.Stage( stage=result.Stage(sandbox_token=repo_conf.sandbox_token),
stages=[],
sandbox_token=repo_conf.sandbox_token,
post_stages=[],
),
) )
current_test = os.environ.get("PYTEST_CURRENT_TEST") is not None current_test = os.environ.get("PYTEST_CURRENT_TEST") is not None
# Construct healthcheck stage # Construct healthcheck stage
if not repo_conf.force_skip_health_check_on_test or not current_test: if not repo_conf.force_skip_health_check_on_test or not current_test:
result_conf.stage.stages.append(get_healthcheck_config(repo_conf)) result_conf.stage.stages.append(get_healthcheck_config(repo_conf))
stages: List[str] = [] cached: List[str] = []
# Convert each stage in the task configuration # Convert each stage in the task configuration
for task_stage in task_conf.stages: 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 = get_conf_stage(task_stage, executor_with_config)
conf_stage = fix_result_detail(task_stage, conf_stage) conf_stage = fix_result_detail(task_stage, conf_stage)
conf_stage = fix_dummy(task_stage, conf_stage) conf_stage = fix_dummy(task_stage, conf_stage)

View File

@ -135,7 +135,7 @@ class Stage(BaseModel):
output_path: str = Field( output_path: str = Field(
"/tmp/joj3_result.json", serialization_alias="outputPath" "/tmp/joj3_result.json", serialization_alias="outputPath"
) # nosec: B108 ) # nosec: B108
stages: List[StageDetail] stages: List[StageDetail] = []
pre_stages: List[StageDetail] = Field([], serialization_alias="preStages") pre_stages: List[StageDetail] = Field([], serialization_alias="preStages")
post_stages: List[StageDetail] = Field([], serialization_alias="postStages") post_stages: List[StageDetail] = Field([], serialization_alias="postStages")