@@ -14,11 +14,19 @@ def noipstyle(content, std):
1414 if std_lines [i ] != content_lines [i ]:
1515 for j in range (min (len (std_lines [i ]), len (content_lines [i ]))):
1616 if std_lines [i ][j ] != content_lines [i ][j ]:
17- return (False , TextMismatch (content , std , 'On line {} column {}, read {}, expected {}.' ,
18- i + 1 , j + 1 , content_lines [i ][j :j + 5 ], std_lines [i ][j :j + 5 ]))
17+ return (False ,
18+ TextMismatch (
19+ content , std ,
20+ 'On line {} column {}, read {}, expected {}.' ,
21+ i + 1 , j + 1 , content_lines [i ][j :j + 5 ],
22+ std_lines [i ][j :j + 5 ]))
1923 if len (std_lines [i ]) > len (content_lines [i ]):
20- return False , TextMismatch (content , std , 'Too short on line {}.' , i )
24+ return False , TextMismatch (
25+ content , std , 'Too short on line {}.' , i + 1 , j + 1 ,
26+ content_lines [i ][j :j + 5 ], std_lines [i ][j :j + 5 ])
2127 if len (std_lines [i ]) < len (content_lines [i ]):
22- return False , TextMismatch (content , std , 'Too long on line {}.' , i )
28+ return False , TextMismatch (
29+ content , std , 'Too long on line {}.' , i + 1 , j + 1 ,
30+ content_lines [i ][j :j + 5 ], std_lines [i ][j :j + 5 ])
2331
2432 return True , None
0 commit comments