Skip to content

Commit

Permalink
修复错误显示的小问题
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Jun 13, 2018
1 parent 1cd5547 commit d649b3e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cyaron/graders/noipstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ def noipstyle(content, std):
return (False,
TextMismatch(
content, std,
'On line {} column {}, read {}, expected {}.'.
format(i + 1, j + 1, content_lines[i][j:j + 5],
std_lines[i][j:j + 5]), i + 1, j + 1,
content_lines[i][j:j + 5],
'On line {} column {}, read {}, expected {}.',
i + 1, j + 1, content_lines[i][j:j + 5],
std_lines[i][j:j + 5]))
if len(std_lines[i]) > len(content_lines[i]):
return False, TextMismatch(
content, std, 'Too short on line {}.'.format(i + 1), i + 1,
j + 1, content_lines[i][j:j + 5], std_lines[i][j:j + 5])
content, std, 'Too short on line {}.', i + 1, j + 1,
content_lines[i][j:j + 5], std_lines[i][j:j + 5])
if len(std_lines[i]) < len(content_lines[i]):
return False, TextMismatch(
content, std, 'Too long on line {}.'.format(i + 1), i + 1,
j + 1, content_lines[i][j:j + 5], std_lines[i][j:j + 5])
content, std, 'Too long on line {}.', i + 1, j + 1,
content_lines[i][j:j + 5], std_lines[i][j:j + 5])

return True, None

0 comments on commit d649b3e

Please sign in to comment.