mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix pylint issues
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user