MCPcopy Index your code
hub / github.com/python/cpython / _format_text

Method _format_text

Lib/argparse.py:519–526  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

517 return parts, pos_start
518
519 def _format_text(self, text):
520 if '%(prog)' in text:
521 text = text % dict(prog=self._prog)
522 text_width = max(self._width - self._current_indent, 11)
523 indent = ' ' * self._current_indent
524 text = self._fill_text(text, text_width, indent)
525 text = self._apply_text_markup(text)
526 return text + '\n\n'
527
528 def _apply_text_markup(self, text):
529 """Apply color markup to text.

Callers

nothing calls this directly

Calls 2

_fill_textMethod · 0.95
_apply_text_markupMethod · 0.95

Tested by

no test coverage detected