Skip to content

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
@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