-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for TyperArgument
arguments
#59
Comments
Thanks for reporting this! I was checking for Let me know how you get on with it! Cheers, Phil |
Hey @ewels, I just updated to the latest release of
|
Ah that's no good, thanks for letting me know. I've moved your comment to a new issue (#70) to track. I'll fix + release ASAP. |
@ewels Hey, thanks for the quick fix. The error is gone now, but I still am having the initial issue (using the latest version of I have also tried explicitly setting |
Ah really? It should now hide the arguments by default.. 🤔 (If you set It works for me with $ python examples/typer/02_subcommands.py download --help
Debug mode is off
Usage: 02_subcommands.py download [OPTIONS] NAME
Pretend to download some files from somewhere. Multi-line help strings are unwrapped until you use a double newline.
Only the first paragraph is used in group help texts. Don't forget you can opt-in to rich and markdown formatting!
Click escape markers should still work.
* So you
* Can keep
* Your newlines
And this is a paragraph that will be rewrapped again.
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --all/--no-all Get everything [default: no-all] │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Can you add an example script to this issue and what you expect it to show? It's entirely possible that |
Yup, there are a few instances of |
typer.Argument
shows up in the Options sectionTyperArgument
arguments
Hey, sorry! Unfortunately, I don't have time to cleanup an example right now (will try to later if still an issue). It sounds like you have managed to identify where the problem is though, right? |
Potentially, but I'm not sure it's the same - I was able to replicate your original issue to begin with but not since 0956afe I'll try to find some time to play with the |
Makes sense. I will try to get a cut down example to you when I have a chance. |
Any update on this? |
Nope, still need a minimal example to replicate the problem. |
How about this? from rich_click import typer
typer.rich_click.SHOW_ARGUMENTS = True
def cli(
name: str = typer.Argument("World"),
say_hi: bool = typer.Option(True),
):
if say_hi:
print(f"Hello, {name}!")
if __name__ == "__main__":
typer.run(cli) The argument shows with |
@ewels If you need any help on this just say the word. |
I've just started my summer holiday so I'll be slow to tackle this now. So yeah if you fancy taking a crack at it that would be fab 👍🏻 |
OK, I'll give it a try. |
@alirezatheh @ewels @zmoon Hey, sorry I never got back on this. Thanks for taking things forward! |
Fixed in #82 |
It seems like
typer.Argument
params are being grouped in with the other options. This happens whether or notSHOW_ARGUMENTS
is enabled.The text was updated successfully, but these errors were encountered: