Skip to content
Discussion options

You must be logged in to vote

Using typer=0.12.5 I still can reproduce the reported issue.

However, I use another workaround that might be interesting:

def main(names: list[str] | None = typer.Argument(None)):
    if names is None:
        names = ["Peter", "Paul", "Mary"]

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Comment options

You must be logged in to vote
0 replies

This comment has been hidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
8 participants
Converted from issue

This discussion was converted from issue #518 on September 19, 2025 09:56.