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

prompt options on groups still prompt when given as named parameters on call_command #43

Closed
bckohan opened this issue Mar 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bckohan
Copy link
Owner

bckohan commented Mar 14, 2024

This is a very specific bug.

    @group()
    def group1(
        self,
        option: Annotated[
            str, Option("-o", hide_input=True, prompt=True, prompt_required=True)
        ],
    ):

call_command('mycommand', 'group1', 'subcommand', option='value')

This will still send a prompt and wait on stdin. The below however works as expected:

call_command('mycommand', 'group1', '-o', 'value', 'subcommand')

commands are similarly affected

The requirement to trigger this bug is that the parameter type must be non-optional.

See test test_call_group_with_prompt_value

@bckohan bckohan added the bug Something isn't working label Mar 14, 2024
@bckohan bckohan self-assigned this Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant