Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

functional subcommands #168

Open
DanCardin opened this issue Nov 6, 2024 · 0 comments
Open

functional subcommands #168

DanCardin opened this issue Nov 6, 2024 · 0 comments

Comments

@DanCardin
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant