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

Method _format_text

Lib/optparse.py:247–258  ·  view source on GitHub ↗

Format a paragraph of free-form text for inclusion in the help output at the current indentation level.

(self, text)

Source from the content-addressed store, hash-verified

245 raise NotImplementedError("subclasses must implement")
246
247 def _format_text(self, text):
248 """
249 Format a paragraph of free-form text for inclusion in the
250 help output at the current indentation level.
251 """
252 import textwrap
253 text_width = max(self.width - self.current_indent, 11)
254 indent = " "*self.current_indent
255 return textwrap.fill(text,
256 text_width,
257 initial_indent=indent,
258 subsequent_indent=indent)
259
260 def format_description(self, description):
261 if description:

Callers 2

format_descriptionMethod · 0.95
format_epilogMethod · 0.95

Calls 1

fillMethod · 0.45

Tested by

no test coverage detected