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

Method _render_title

awscli/table.py:288–301  ·  view source on GitHub ↗
(self, section, max_width, stream)

Source from the content-addressed store, hash-verified

286 self._render_rows(section, max_width, stream)
287
288 def _render_title(self, section, max_width, stream):
289 # The title consists of:
290 # title : | This is the title |
291 # bottom_border: ----------------------------
292 if section.title:
293 title = self._styler.style_title(section.title)
294 stream.write(
295 center_text(
296 title, max_width, '|', '|', get_text_length(section.title)
297 )
298 + '\n'
299 )
300 if not section.headers and not section.rows:
301 stream.write('+%s+' % ('-' * (max_width - 2)) + '\n')
302
303 def _render_column_titles(self, section, max_width, stream):
304 if not section.headers:

Callers 1

_render_sectionMethod · 0.95

Calls 4

center_textFunction · 0.85
get_text_lengthFunction · 0.85
style_titleMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected