MCPcopy Create free account
hub / github.com/RustPython/RustPython / TitledHelpFormatter

Class TitledHelpFormatter

Lib/optparse.py:377–393  ·  view source on GitHub ↗

Format help with underlined section headers.

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by 1