MCPcopy Index your code
hub / github.com/RustPython/RustPython / store_option_strings

Method store_option_strings

Lib/optparse.py:321–337  ·  view source on GitHub ↗
(self, parser)

Source from the content-addressed store, hash-verified

319 return "".join(result)
320
321 def store_option_strings(self, parser):
322 self.indent()
323 max_len = 0
324 for opt in parser.option_list:
325 strings = self.format_option_strings(opt)
326 self.option_strings[opt] = strings
327 max_len = max(max_len, len(strings) + self.current_indent)
328 self.indent()
329 for group in parser.option_groups:
330 for opt in group.option_list:
331 strings = self.format_option_strings(opt)
332 self.option_strings[opt] = strings
333 max_len = max(max_len, len(strings) + self.current_indent)
334 self.dedent()
335 self.dedent()
336 self.help_position = min(max_len + 2, self.max_help_position)
337 self.help_width = max(self.width - self.help_position, 11)
338
339 def format_option_strings(self, option):
340 """Return a comma-separated list of option strings & metavariables."""

Callers 1

format_option_helpMethod · 0.80

Calls 6

indentMethod · 0.95
format_option_stringsMethod · 0.95
dedentMethod · 0.95
maxFunction · 0.85
lenFunction · 0.85
minFunction · 0.85

Tested by

no test coverage detected