@@ -14,11 +14,21 @@ 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+ format (i + 1 , j + 1 , content_lines [i ][j :j + 5 ],
22+ std_lines [i ][j :j + 5 ]), i + 1 , j + 1 ,
23+ content_lines [i ][j :j + 5 ],
24+ std_lines [i ][j :j + 5 ]))
1925 if len (std_lines [i ]) > len (content_lines [i ]):
20- return False , TextMismatch (content , std , 'Too short on line {}.' , i )
26+ return False , TextMismatch (
27+ content , std , 'Too short on line {}.' .format (i ), i + 1 ,
28+ j + 1 , content_lines [i ][j :j + 5 ], std_lines [i ][j :j + 5 ])
2129 if len (std_lines [i ]) < len (content_lines [i ]):
22- return False , TextMismatch (content , std , 'Too long on line {}.' , i )
30+ return False , TextMismatch (
31+ content , std , 'Too long on line {}.' .format (i ), i + 1 ,
32+ j + 1 , content_lines [i ][j :j + 5 ], std_lines [i ][j :j + 5 ])
2333
2434 return True , None
0 commit comments