Skip to content

Commit ff2525a

Browse files
committed
optimize
1 parent f7c5ae4 commit ff2525a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

rich/table.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,13 +453,10 @@ def _render(
453453
for index, (first, last, row) in enumerate(loop_first_last(rows)):
454454
max_height = 1
455455
cells: List[List[List[Segment]]] = []
456+
row_style = get_style(get_row_style(index))
456457
for width, cell, column in zip(widths, row, columns):
457458
render_options = options.update(width=width, justify=column.justify)
458-
cell_style = (
459-
table_style
460-
+ get_style(get_row_style(index))
461-
+ get_style(cell.style)
462-
)
459+
cell_style = table_style + row_style + get_style(cell.style)
463460
lines = console.render_lines(
464461
cell.renderable, render_options, style=cell_style
465462
)

0 commit comments

Comments
 (0)