Remove (possibly unneeded) try/except in table.py

This commit is contained in:
moltenmuffins 2020-10-08 19:32:58 +08:00
parent 5daff036fc
commit 9ca660bd13
1 changed files with 4 additions and 7 deletions

View File

@ -488,13 +488,10 @@ class Table(JupyterMixin):
max_column = max(
width for width, allow_wrap in zip(widths, wrapable) if allow_wrap
)
try:
second_max_column = max(
width if allow_wrap and width != max_column else 0
for width, allow_wrap in zip(widths, wrapable)
)
except ValueError:
second_max_column = 0
second_max_column = max(
width if allow_wrap and width != max_column else 0
for width, allow_wrap in zip(widths, wrapable)
)
column_difference = max_column - second_max_column
ratios = [
(1 if (width == max_column and allow_wrap) else 0)