How can I create an annotated argument without a default value? #616
Unanswered
justinclloyd
asked this question in
Questions
Replies: 1 comment
-
Probably some terminology miscommunication here, but If the argument has a default value, then it is an optional argument, is it not? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
The example code doesn't work, throwing the following exception saying that Option() needs a default argument.
Ultimately, I'm trying to create a Typer command that takes a required pathlib.Path argument for which there is no sane default value. I could make one up, even use a fake location, but I feel this should be possible.
Operating System
Linux
Operating System Details
Ubuntu 20.04
Typer Version
0.4.2
Python Version
3.8.10
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions