MCPcopy
hub / github.com/Textualize/rich / _get_padding_width

Method _get_padding_width

rich/table.py:700–714  ·  view source on GitHub ↗

Get extra width from padding.

(self, column_index: int)

Source from the content-addressed store, hash-verified

698 )
699
700 def _get_padding_width(self, column_index: int) -> int:
701 """Get extra width from padding."""
702 _, pad_right, _, pad_left = self.padding
703
704 if self.collapse_padding:
705 pad_left = 0
706 pad_right = abs(pad_left - pad_right)
707
708 if not self.pad_edge:
709 if column_index == 0:
710 pad_left = 0
711 if column_index == len(self.columns) - 1:
712 pad_right = 0
713
714 return pad_left + pad_right
715
716 def _measure_column(
717 self,

Callers 1

_measure_columnMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected