Skip to content

Commit 4b14529

Browse files
GH-139862: Remove color from HelpFormatter (#142274)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 100c726 commit 4b14529

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Lib/argparse.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,13 @@ def __init__(
166166
indent_increment=2,
167167
max_help_position=24,
168168
width=None,
169-
color=True,
170169
):
171170
# default setting for width
172171
if width is None:
173172
import shutil
174173
width = shutil.get_terminal_size().columns
175174
width -= 2
176175

177-
self._set_color(color)
178176
self._prog = prog
179177
self._indent_increment = indent_increment
180178
self._max_help_position = min(max_help_position,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove ``color`` parameter from :class:`!argparse.HelpFormatter` constructor. Color is controlled by :class:`~argparse.ArgumentParser`.

0 commit comments

Comments
 (0)