@@ -329,7 +329,8 @@ def apply_pagination_borders(
329329 and document .rtf_body .border_first
330330 ):
331331 # Apply border_first to first data row, respecting per-column settings
332- # Only use border_top if it has non-empty values; empty means use border_first
332+ # Only use border_top if it has non-empty values;
333+ # empty means use border_first
333334 if isinstance (document .rtf_body .border_first , list ):
334335 border_first_row = document .rtf_body .border_first [0 ]
335336 has_border_top = (
@@ -345,7 +346,8 @@ def apply_pagination_borders(
345346 else :
346347 border_style = border_first_row [0 ]
347348
348- # Only override with border_top if it has a non-empty value for this column
349+ # Only override with border_top if it has a non-empty value
350+ # for this column
349351 if (
350352 has_border_top
351353 and col_idx < len (document .rtf_body .border_top [0 ])
@@ -370,8 +372,10 @@ def apply_pagination_borders(
370372
371373 # Apply page-level borders for non-first/last pages
372374 if not page_info ["is_first_page" ] and document .rtf_body .border_first :
373- # Apply border_first to first row of non-first pages, respecting per-column settings
374- # Only use border_top if it has non-empty values; empty means use border_first
375+ # Apply border_first to first row of non-first pages,
376+ # respecting per-column settings
377+ # Only use border_top if it has non-empty values;
378+ # empty means use border_first
375379 if isinstance (document .rtf_body .border_first , list ):
376380 border_first_row = document .rtf_body .border_first [0 ]
377381 has_border_top = (
@@ -387,7 +391,8 @@ def apply_pagination_borders(
387391 else :
388392 border_style = border_first_row [0 ]
389393
390- # Only override with border_top if it has a non-empty value for this column
394+ # Only override with border_top if it has a non-empty value
395+ # for this column
391396 if (
392397 has_border_top
393398 and col_idx < len (document .rtf_body .border_top [0 ])
0 commit comments