Argument() missing 1 required positional argument: "default" #656
Answered
by
Tong-Du
abdelkareemkobo
asked this question in
Questions
-
First Check
Commit to Help
Example Codeimport typer
from typing_extensions import Annotated
def main(
name:Annotated[
str,
typer.Argument(
help="Who to greet",show_default="Deadpoolio the amazing's name"
),
]="Wade Wilson"):
print(f"Hello {name}")
if __name__=="__main__":
typer.run(main) DescriptionThis code must work and when i typed python main.py --help or python main.py it should run but i get the following error: Operating SystemLinux Operating System Detailspop os Typer Version0.7.0 Python Version3.10.11 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
Tong-Du
Aug 24, 2023
Replies: 1 comment
-
Works fine on typer 0.9.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
abdelkareemkobo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works fine on typer 0.9.0