click
click copied to clipboard
Fix help output for Shiv and PEX
This change ensures that "Usage" help output is correctly displayed when Click scripts are run inside Shiv or PEX zipapps, where __package__
is set to the empty string rather than None
.
- fixes #2332
- Problem introduced by #1609
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.rst
summarizing the change and linking to the issue. - [x] Add
.. versionchanged::
entries in any relevant code docs. - [x] Run
pre-commit
hooks and fix any issues. - [x] Run
pytest
andtox
, no tests failed.