Skip to content

show_defaults now accepts string value as suggested by the docs#1755

Merged
davidism merged 1 commit into
pallets:masterfrom
b3n4kh:show_defaults_string_value
Feb 15, 2021
Merged

show_defaults now accepts string value as suggested by the docs#1755
davidism merged 1 commit into
pallets:masterfrom
b3n4kh:show_defaults_string_value

Conversation

@b3n4kh
Copy link
Copy Markdown
Contributor

@b3n4kh b3n4kh commented Jan 15, 2021

Fixes #1732 by removing the mandatory "default" flag for using show_defaults with a string value.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • [docs already up2date] Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

@davidism
Copy link
Copy Markdown
Member

davidism commented Feb 15, 2021

If Option.show_default or Context.show_default is True, this change causes it to show None instead of hiding the value. Needs some extra checks to only show when it's a string.

@davidism davidism merged commit b28bc4c into pallets:master Feb 15, 2021
@davidism davidism added this to the 8.0.0 milestone Feb 15, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 2, 2021
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.

Custom default label ignored if default is None

2 participants