Skip to content
Discussion options

You must be logged in to vote

Actually, I would say the usage is wrong here.
It makes no sense to annotate the item type of the list with the typer.Argument description.

Your code would work just fine if you had done the reverse:

def test(arg: Annotated[List[str], typer.Argument(help="test")]):  #  <- yay!
    print("test")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@The-Compiler
Comment options

Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants