Closed sirosen closed 3 months ago
This is a duplicate of https://github.com/click-contrib/click-man/pull/62 that was merged recently.
:shrug: or #62 is a dup of this.
The current sense I get is that this project is defunct (no releases in several years), but it's great prior art for writing your own thing.
When an option has hidden=True set, Option.get_help_record returns None. Simply filter these out to avoid a later failure when trying to unpack helptext.
I wanted to add a test for this, but there doesn't seem to be a framework for it. You can check it on any command where
hidden=True
on an option.The issue which crops up without this is here: https://github.com/click-contrib/click-man/blob/3e5a73bda22a8a6ae2e169385173723a11b17409/click_man/man.py#L91
Unpacking that tuple fails if the value is
None
.