1
0

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:
ThomasV
2025-03-18 11:15:16 +01:00
parent 92b03d827c
commit e67cb560f6
4 changed files with 479 additions and 206 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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)