mirror of
https://github.com/python/cpython.git
synced 2025-10-25 18:54:53 +00:00
[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:
parent
2f7684ceee
commit
17c5959aa3
6 changed files with 39 additions and 25 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue