Replies: 1 comment
-
|
The following code work well in current version (0.17.4): import typer
cli = typer.Typer()
@cli.command()
def first(a: str, b: str, c: bool = False):
typer.secho(f"{a=} {b=} {c=}")
@cli.command()
def second(a: str, b: str, c: bool = False):
typer.secho(f"{a=} {b=} {c=}")
if __name__ == "__main__":
cli()Try: |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
First Check
Commit to Help
Example Code
Description
I have a poetry package with a
Typerobject as entrypoint. A subcommand has the following--helppage:I want to be able to pass
-somethingasa. For instance:But that raises this error:
As per #134, this should do the trick:
But errors as well.
Is there any way to do this?
Operating System
Linux
Operating System Details
Fedora 38
Typer Version
0.12.3
Python Version
3.11
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions