You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by JacobKochems August 1, 2023
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
I added a very descriptive title here.
I used the GitHub search to find a similar question 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.
With rich installed, calling the above example with python mre.py --help produces the following help output:
Usage: mre.py [OPTIONS] MY_ARG
Show user.
╭─ Arguments ──────────────────────────────────────────────────
│ * user MY_ARG [default: None] [required]
╰────────────────────────────────────────────────────────
╭─ Options ───────────────────────────────────────────────────
│ --install-completion Install completion for the current shell.
│ --show-completion Show completion for the current shell, to copy it or customize the installation.
│ --help Show this message and exit.
╰────────────────────────────────────────────────────────
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 if metavar!="user".upper(), which seems to be related to #438.
Without rich being installed the above example looks like this:
Usage: mre.py [OPTIONS] MY_ARG
Show user.
Arguments:
MY_ARG [required]
Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
--help Show this message and exit.
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 namesuser/USER to be replaced by metavar 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
The text was updated successfully, but these errors were encountered:
Discussed in #646
Originally posted by JacobKochems August 1, 2023
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
The text was updated successfully, but these errors were encountered: