Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions problemtools/judge/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ def _parse_validator_result(
return SubmissionResult('JE', reason='validator produced "score.txt" but problem does not have custom scoring activated')

score: float | None = None
if metadata.is_custom_score_mandatory():
if metadata.is_custom_score_allowed():
if score_file.is_file():
try:
score = float(score_file.read_text())
except Exception as e:
return SubmissionResult('JE', reason=f'failed to parse validator score: {e}')
elif metadata.is_multi_pass() and (feedback_dir / 'nextpass.in').is_file():
score = 0.0
else:
elif metadata.is_custom_score_mandatory():
return SubmissionResult('JE', reason='problem has custom scoring but validator did not produce "score.txt"')

return SubmissionResult('AC', score=score)
Expand Down