1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-04-15 23:47:24 +02:00

Fixed PERF401 (manual-list-comprehension): Use a list comprehension to create a transformed list

This commit is contained in:
Teal Dulcet
2023-12-23 05:40:37 -08:00
committed by Joshua Tauberer
parent cacf6d2006
commit 1d79f9bb2b
2 changed files with 4 additions and 11 deletions

View File

@@ -619,10 +619,7 @@ def print_time_table(labels, data, do_print=True):
data.insert(0, [str(h) for h in range(24)])
temp = "{:<%d} " % max(len(l) for l in labels)
lines = []
for label in labels:
lines.append(temp.format(label))
lines = [temp.format(label) for label in labels]
for h in range(24):
max_len = max(len(str(d[h])) for d in data)