Skip to content

Commit e8b6dd7

Browse files
committed
Restore handling of click.Option.hidden=True
This is now standard but only in Click version 8 We still nee to do it ourselves for older versions. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent d608300 commit e8b6dd7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/commoncode/cliutils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ def __init__(
381381
allow_from_autoenv=allow_from_autoenv,
382382
type=type,
383383
help=help,
384-
hidden=hidden,
385384
**kwargs
386385
)
387386

@@ -412,6 +411,11 @@ def validate_dependencies(self, ctx, value):
412411
_validate_option_dependencies(ctx, self, value, self.required_options, required=True)
413412
_validate_option_dependencies(ctx, self, value, self.conflicting_options, required=False)
414413

414+
def get_help_record(self, ctx):
415+
if not self.hidden:
416+
return click.Option.get_help_record(self, ctx)
417+
418+
415419

416420
def validate_option_dependencies(ctx):
417421
"""

0 commit comments

Comments
 (0)