1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36:13 +01:00

Merge pull request #1213 from dmach/fix-cmdln-hide

cmdln: Fix hide() decorator to take an optional argument with a boolean value
This commit is contained in:
Daniel Mach 2023-01-16 16:32:41 +01:00 committed by GitHub
commit 62464025b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ def name(name):
return decorate
def hide():
def hide(value=True):
"""
For obsolete calls, hide them in help listings.
@ -72,7 +72,7 @@ def hide():
#...implement 'shell' command
"""
def decorate(f):
f.hidden = True
f.hidden = bool(value)
return f
return decorate