Replies: 2 comments 3 replies
-
The example code doesn't run. You need to apply the following diff: - run(main())
+ run(main) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Wouldn't it be simpler to just a have an optional from typing import Annotated, Optional
from typer import Option, run
def main(glob: Annotated[str, Option(help="help for glob")] = ""):
print(locals())
if __name__ == "__main__":
run(main) Examples:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Example Code
Description
I'd like to be able to have
--flag
with a--no-flag
counterpart. These would be mutually exclusive (not supported per #140), and the former would accept a string (as opposed to a boolean option, which currently provides this kind of flag pair.Operating System
Linux, Windows, macOS
Operating System Details
No response
Typer Version
0.9.0
Python Version
3.9.16
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions