Skip to content

function-based subcommands #168

@DanCardin

Description

@DanCardin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions