dblume commited on 2023-03-04 21:06:48
Showing 1 changed files, with 1 additions and 3 deletions.
... | ... |
@@ -23,14 +23,12 @@ def print_table(rows: Sequence[Sequence[str]], |
23 | 23 |
fmt = f"{col_delimiter.lstrip()}{fmt}{col_delimiter.rstrip()}" |
24 | 24 |
|
25 | 25 |
# Print each row using the computed format |
26 |
- if underline_header: |
|
27 | 26 |
print(fmt.format(*rows[0])) |
27 |
+ if underline_header: |
|
28 | 28 |
if outside_delimiters: |
29 | 29 |
print(col_delimiter.lstrip() + col_delimiter.join([(underline_header * i) for i in col_widths]) + col_delimiter.rstrip()) |
30 | 30 |
else: |
31 | 31 |
print(col_delimiter.join([(underline_header * i) for i in col_widths])) |
32 |
- else: |
|
33 |
- print(fmt.format(*rows[0])) |
|
34 | 32 |
for row in rows[1:]: |
35 | 33 |
print(fmt.format(*row)) |
36 | 34 |
|
37 | 35 |