argclz.dispatch.core.BoundDispatchGroup#
- class argclz.dispatch.core.BoundDispatchGroup[source]#
Bases:
NamedTupleBoundDispatchGroup(zelf, group)
- __init__()#
Methods Summary
__init__()find_command(command)find
dispatch()function according to command in this group.invoke_command(command, *args, **kwargs)invoke a
dispatch()function in this group.list_commands(*[, all])list all
dispatch()info in this group.Attributes Summary
Details
- list_commands(*, all=False)[source]#
list all
dispatch()info in this group.- Parameters:
all (bool) – including hidden commands
- Returns:
list of DispatchCommand
- Return type:
- find_command(command)[source]#
find
dispatch()function according to command in this group.- Parameters:
command (str) – command or one of command’s aliases
- Returns:
found DispatchCommand
- Return type:
DispatchCommand | None
- invoke_command(command, *args, **kwargs)[source]#
invoke a
dispatch()function in this group.- Parameters:
command (str) – command or one of command’s aliases :param args: positional arguments of the target function
kwargs – keyword arguments of the target function
- Returns:
function’s return
- Raises:
- Return type: