Fix pylint issues

This commit is contained in:
hrkrshnn
2021-06-30 10:38:37 +02:00
parent f5d659da0c
commit 0ef7d27dbd
7 changed files with 31 additions and 18 deletions
+4 -2
View File
@@ -10,7 +10,8 @@ import sys
import re
def extract_test_cases(_path):
lines = open(_path, mode='rb', encoding='utf8').read().splitlines()
with open(_path, mode='rb', encoding='utf8') as f:
lines = f.read().splitlines()
inside = False
delimiter = ''
@@ -22,7 +23,8 @@ def extract_test_cases(_path):
for l in lines:
if inside:
if l.strip().endswith(')' + delimiter + '";'):
open('%03d_%s.sol' % (ctr, test_name), mode='wb', encoding='utf8').write(test)
with open('%03d_%s.sol' % (ctr, test_name), mode='wb', encoding='utf8') as f:
f.write(test)
ctr += 1
inside = False
test = ''