[3.14] GH-130645: Default to color help in argparse (GH-136809) (#136886)

GH-130645: Default to color help in argparse (GH-136809)
(cherry picked from commit acbe896cb1)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-07-21 00:22:53 +02:00 committed by GitHub
parent 2f7684ceee
commit 17c5959aa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 39 additions and 25 deletions

View file

@ -167,7 +167,7 @@ def __init__(
indent_increment=2,
max_help_position=24,
width=None,
color=False,
color=True,
):
# default setting for width
if width is None:
@ -1231,7 +1231,7 @@ def __init__(self,
self._name_parser_map = {}
self._choices_actions = []
self._deprecated = set()
self._color = False
self._color = True
super(_SubParsersAction, self).__init__(
option_strings=option_strings,
@ -1878,7 +1878,7 @@ def __init__(self,
exit_on_error=True,
*,
suggest_on_error=False,
color=False,
color=True,
):
superinit = super(ArgumentParser, self).__init__
superinit(description=description,