Commands: add option documentation in docstring.
This allows plugins to document the commands they add.
The docstring is parsed as a regular expression:
arg:<type>:<name>:<description>\n
Types are defined in commands.arg_types.
Note that this commit removes support for single letter
shortcuts in command options.
If a command is not properly documented, a warning is issued
with print(), because no logger is available at this point.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -15,5 +15,9 @@ async def push(self: 'Commands', plugin: 'LabelsPlugin' = None, wallet=None) ->
|
||||
|
||||
@plugin_command('w', plugin_name)
|
||||
async def pull(self: 'Commands', plugin: 'LabelsPlugin' = None, wallet=None, force=False) -> int:
|
||||
""" pull labels from server """
|
||||
"""
|
||||
pull missing labels from server
|
||||
|
||||
arg:bool:force:pull all labels
|
||||
"""
|
||||
return await plugin.pull_thread(wallet, force=force)
|
||||
|
||||
Reference in New Issue
Block a user