From bf646536929caf9a8dd7f6334196625b90a4e977 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Thu, 4 Dec 2025 14:42:48 -0800 Subject: [PATCH 1/3] Remove color from HelpFormatter --- Lib/argparse.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/argparse.py b/Lib/argparse.py index 55ecdadd8c9398..41467707d393c0 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -166,7 +166,6 @@ def __init__( indent_increment=2, max_help_position=24, width=None, - color=True, ): # default setting for width if width is None: @@ -174,7 +173,6 @@ def __init__( width = shutil.get_terminal_size().columns width -= 2 - self._set_color(color) self._prog = prog self._indent_increment = indent_increment self._max_help_position = min(max_help_position, From 1235580cdca0993b88e5affd72472caae19b9855 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 23:24:27 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst diff --git a/Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst b/Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst new file mode 100644 index 00000000000000..190c57921c0883 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst @@ -0,0 +1 @@ +Remove ``color`` parameter from :class:`argparse.HelpFormatter` constructor. Color is controlled by :class:`ArgumentParser`. From e99409e820410fe15d11520bbbde328e0b1e3fb3 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Fri, 5 Dec 2025 07:48:04 -0800 Subject: [PATCH 3/3] Update Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .../next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst b/Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst index 190c57921c0883..2bee8881a75749 100644 --- a/Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst +++ b/Misc/NEWS.d/next/Library/2025-12-04-23-24-24.gh-issue-139862.NBfsD4.rst @@ -1 +1 @@ -Remove ``color`` parameter from :class:`argparse.HelpFormatter` constructor. Color is controlled by :class:`ArgumentParser`. +Remove ``color`` parameter from :class:`!argparse.HelpFormatter` constructor. Color is controlled by :class:`~argparse.ArgumentParser`.