fix: penalty for negative score
All checks were successful
build / trigger-build-image (push) Successful in 13s
All checks were successful
build / trigger-build-image (push) Successful in 13s
This commit is contained in:
parent
9e31fc71be
commit
54a4f404fe
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user