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

Method color_option_strings

Lib/argparse.py:614–621  ·  view source on GitHub ↗
(strings)

Source from the content-addressed store, hash-verified

612 else:
613
614 def color_option_strings(strings):
615 parts = []
616 for s in strings:
617 if self._is_long_option(s):
618 parts.append(f"{t.long_option}{s}{t.reset}")
619 else:
620 parts.append(f"{t.short_option}{s}{t.reset}")
621 return parts
622
623 # if the Optional doesn't take a value, format is:
624 # -s, --long

Callers

nothing calls this directly

Calls 2

_is_long_optionMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected