[py] apply lgtm.com python suggestions

This commit is contained in:
Ebrahim Byagowi 2020-07-13 21:32:15 +04:30
parent 2a182128b9
commit 6937092a66
2 changed files with 4 additions and 6 deletions

View File

@ -41,8 +41,8 @@ files = [open (x, encoding='utf-8') for x in sys.argv[1:]]
headers = [[f.readline () for i in range (2)] for f in files] headers = [[f.readline () for i in range (2)] for f in files]
data = [{} for f in files] data = [{} for _ in files]
values = [{} for f in files] values = [{} for _ in files]
for i, f in enumerate (files): for i, f in enumerate (files):
for line in f: for line in f:
@ -215,7 +215,6 @@ for u in uu:
if start != last + 1: if start != last + 1:
if start - last <= 1+16*3: if start - last <= 1+16*3:
print_block (None, last+1, start-1, data) print_block (None, last+1, start-1, data)
last = start-1
else: else:
if last >= 0: if last >= 0:
ends.append (last + 1) ends.append (last + 1)

View File

@ -22,8 +22,8 @@ files = [open (x, encoding='utf-8') for x in sys.argv[1:]]
headers = [[f.readline () for i in range (2)] for j,f in enumerate(files) if j != 2] headers = [[f.readline () for i in range (2)] for j,f in enumerate(files) if j != 2]
headers.append (["UnicodeData.txt does not have a header."]) headers.append (["UnicodeData.txt does not have a header."])
data = [{} for f in files] data = [{} for _ in files]
values = [{} for f in files] values = [{} for _ in files]
for i, f in enumerate (files): for i, f in enumerate (files):
for line in f: for line in f:
@ -488,7 +488,6 @@ for u in uu:
if start != last + 1: if start != last + 1:
if start - last <= 1+16*3: if start - last <= 1+16*3:
print_block (None, last+1, start-1, data) print_block (None, last+1, start-1, data)
last = start-1
else: else:
if last >= 0: if last >= 0:
ends.append (last + 1) ends.append (last + 1)