Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 16, 2021

Co-authored-by: Micky Yun Chan [email protected]
(cherry picked from commit 1512bc2)

Co-authored-by: Maximilian Hils [email protected]

https://bugs.python.org/issue38956

…H-27672)

Co-authored-by: Micky Yun Chan <[email protected]>
(cherry picked from commit 1512bc2)

Co-authored-by: Maximilian Hils <[email protected]>
@miss-islington
Copy link
Contributor Author

@mhils and @ambv: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@mhils and @ambv: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@mhils and @ambv: Status check is done, and it's a success ✅ .

Copy link
Contributor

@ambv ambv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablogsal, this is a trivial fix for duplicated default values displayed in help for boolean options (added in 3.9.0). I intend to release that in 3.9.7 on August 30th.

There are more problems here that we could be fixing with larger refactors (see BPO-44587 for details) but this trivial change is a clear improvement over what we currently ship with.


if help is not None and default is not None:
help += f" (default: {default})"
help += " (default: %(default)s)"
Copy link
Contributor

@ambv ambv Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablogsal, this works since the help string is treated as a formatting string (and presence of '%(default)' is detected). That way default display isn't duplicated.

@miss-islington miss-islington merged commit 6f6648e into python:3.10 Aug 17, 2021
@miss-islington miss-islington deleted the backport-1512bc2-3.10 branch August 17, 2021 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants