[3.9] bpo-38956: don't print BooleanOptionalAction's default twice (GH-27672) (GH-27788)

Co-authored-by: Micky Yun Chan <michan@redhat.com>.
(cherry picked from commit 1512bc21d6)

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
This commit is contained in:
Łukasz Langa 2021-08-17 11:17:00 +02:00 committed by GitHub
parent c7c4cbc58e
commit 27fd313110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 8 deletions

View file

@ -875,7 +875,7 @@ class BooleanOptionalAction(Action):
_option_strings.append(option_string)
if help is not None and default is not None:
help += f" (default: {default})"
help += " (default: %(default)s)"
super().__init__(
option_strings=_option_strings,