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

Class TitledHelpFormatter

Lib/optparse.py:375–391  ·  view source on GitHub ↗

Format help with underlined section headers.

Source from the content-addressed store, hash-verified

373
374
375class TitledHelpFormatter (HelpFormatter):
376 """Format help with underlined section headers.
377 """
378
379 def __init__(self,
380 indent_increment=0,
381 max_help_position=24,
382 width=None,
383 short_first=0):
384 HelpFormatter.__init__ (
385 self, indent_increment, max_help_position, width, short_first)
386
387 def format_usage(self, usage):
388 return "%s %s\n" % (self.format_heading(_("Usage")), usage)
389
390 def format_heading(self, heading):
391 return "%s\n%s\n" % (heading, "=-"[self.level] * len(heading))
392
393
394def _parse_num(val, type):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…