Clarification needed for boolean option behavior (--flag / --no-flag) #1415
Unanswered
Songcheng-Xie
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
When I was running the README example that uses a boolean parameter:
I was confused why the command-line syntax uses:
instead of passing boolean values like:
As a beginner, I expected boolean parameters to accept values directly.
It would help newcomers if the documentation explained:
True/Falsevalues in CLI design.--formal= True and--no-formal= False.--force,--verbose).This is a common confusion point for new users, and adding a small explanation in the tutorial or README would greatly improve clarity.
I would be happy to submit a PR to improve this part of the documentation.
Operating System
macOS
Operating System Details
macOS Ventura Version 13.3.1
Typer Version
0.20.0
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions