-
-
Notifications
You must be signed in to change notification settings - Fork 853
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
First Check
- I added a very descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn't find it.
- I searched the Typer documentation, with the integrated search.
- I already searched in Google "How to X in Typer" and didn't find any information.
- I already read and followed all the tutorial in the docs and didn't find an answer.
- I already checked if it is not related to Typer but to Click.
Commit to Help
- I commit to help with one of those options 👆
Example Code
from __future__ import annotations
import typer
app = typer.Typer()
def main():
app()
@app.command()
def test(flag: bool | None = typer.Option(None, "--flag", "-f", help="A flag")):
print(flag)
if __name__ == "__main__":
main()Description
- Run the example code
- See the error: https://sourceb.in/SxyHEeLZxf
Operating System
Linux
Operating System Details
No response
Typer Version
0.4.0
Python Version
Python 3.8.10
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working