Argument(metavar="MY_ARG") has different meaning for the arguments panel compared to the usage text or the non-rich help output #646
Unanswered
JacobKochems
asked this question in
Questions
Replies: 2 comments 2 replies
-
I noticed the same. I think this should be turned into an issue? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Who can do this? Can we or do we need a maintainer for that? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, thanks to all who are involved, especially to the creator, for your hard work. It's really a cool project.
First Check
Commit to Help
Example Code
Description
Observed Behavior
With rich installed, calling the above example with
python mre.py --help
produces the following help output:In the usage text
MY_ARG
stands for the argument name but in the argument panel it stands for the argument type, thereby rendering this solution: #230 (comment) invalid for rich help text output.Moreover, the argument type can only be set/overwritten by
metavar
ifmetavar!="user".upper()
, which seems to be related to #438.Without rich being installed the above example looks like this:
and works as expected: in both places
MY_ARG
stands for the argument name and the argument type vanishes.Expected Behavior
I expect the respective argument names
user
/USER
to be replaced bymetavar
regardless of output mode and the argument type to stay unchanged.Operating System
Linux
Operating System Details
No response
Typer Version
0.9.0
Python Version
3.9.2
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions