MCPcopy Create free account
hub / github.com/aws/aws-cli / total_width

Method total_width

awscli/table.py:427–442  ·  view source on GitHub ↗
(self, padding=0, with_border=False, outer_padding=0)

Source from the content-addressed store, hash-verified

425 return scaled
426
427 def total_width(self, padding=0, with_border=False, outer_padding=0):
428 total = 0
429 # One char on each side == 2 chars total to the width.
430 border_padding = 2
431 for w in self.calculate_column_widths():
432 total += w + padding
433 if with_border:
434 total += border_padding
435 total += outer_padding + outer_padding
436 return max(
437 get_text_length(self.title)
438 + border_padding
439 + outer_padding
440 + outer_padding,
441 total,
442 )
443
444 def add_title(self, title):
445 self.title = title

Calls 2

get_text_lengthFunction · 0.85