Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in show defaults when using a flag option and a default map #2730

Merged
merged 1 commit into from
May 22, 2024
Merged

fix bug in show defaults when using a flag option and a default map #2730

merged 1 commit into from
May 22, 2024

Conversation

ChrisPappalardo
Copy link
Contributor

In latest main, when a flag option is used with show_default=True and a default_map is passed, --help shows the default value in the decorator and not the value in the default map.

This PR does two things:

  • Adds unit tests to demonstrate the bug
  • Removes the bug from core

fixes #2632

Copy link

@Abdur-rahmaanJ Abdur-rahmaanJ left a comment

Choose a reason for hiding this comment

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

LGTM, added

  • relevant changes to CHANGES.rst
  • unit-test to test if issue solved
  • fix for the issue

Thanks @ChrisPappalardo for being thoughtful while working on this 🎉

@davidism davidism added this to the 8.1.8 milestone May 22, 2024
@davidism davidism changed the base branch from main to 8.1.x May 22, 2024 21:01
@davidism davidism closed this May 22, 2024
@davidism davidism reopened this May 22, 2024
@davidism davidism merged commit bc16dbf into pallets:8.1.x May 22, 2024
13 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag option with secondary opts: show_default=True does not show value from default_map in "help" output
3 participants