click
click copied to clipboard
Hide default value when show_default is False
Previously, when show_default was False on an Option, the value could still appear in the prompt. Remove this so that sensitive values can be hidden from prompts.
Checklist:
- [x] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
- [x] Add or update relevant docs, in the docs folder and in code.
- [x] Add an entry in
CHANGES.rstsummarizing the change and linking to the issue. - [x] Add
.. versionchanged::entries in any relevant code docs. - [x] Run
pre-commithooks and fix any issues. - [x] Run
pytestandtox, no tests failed.
Also, this PR doesn't pass pre-commit at the moment. You might want to run pre-commit run -a in order to make sure that all files are according to Click's style guideline.
Issues fixed. Added comment and also restructured code to make behavior of show_default arg to prompt more explicit