cappa
cappa copied to clipboard
function-based subcommands
Perhaps something like
@command(subcommands=[a, b])
def function():
...
def a():
...
def b():
...
A syntax like this is essentially forced, given the lack of a real, namable type to be able to reference in an annotation.
It doesn't really make sense from an upper level object mapping sense, but this would essentially be short for applying a subcommand directive (perhaps with has_value=False?) manually.