]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-112527: Fix help text for required options in argparse (GH-112528) (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 9 Dec 2025 17:35:49 +0000 (19:35 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Dec 2025 17:35:49 +0000 (17:35 +0000)
commitdafac8a47a3680b6adcb4ccc23e9ba63316aaf60
tree14e436beac417fe0660083da4332f08d7717f46a
parent69ecb4c234b6aa6f2863e8282526264a1f7942ba
[3.14] gh-112527: Fix help text for required options in argparse (GH-112528) (GH-142475)

For optional arguments with required=True, the ArgumentDefaultsHelpFormatter
would always add a " (default: None)" to the end of the help text.
Since that's a bit misleading, it is removed with this commit.
(cherry picked from commit 1adb17b1a26e1547d14ca15f915e605cfdda3edd)

Co-authored-by: Fabian Henze <32638720+henzef@users.noreply.github.com>
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/next/Library/2025-12-09-14-40-45.gh-issue-112527.Tvf5Zk.rst [new file with mode: 0644]