[3.13] gh-112527: Fix help text for required options in argparse (GH-112528) (GH-142477)

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 1adb17b1a2)

Co-authored-by: Fabian Henze <32638720+henzef@users.noreply.github.com>
This commit is contained in:
Serhiy Storchaka 2025-12-09 19:36:24 +02:00 committed by GitHub
parent 55e16b74fd
commit 24036f55e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 7 deletions

View file

@ -0,0 +1,2 @@
The help text for required options in :mod:`argparse` no
longer extended with " (default: None)".