Replies: 6 comments
-
|
I still get this behavior with
|
Beta Was this translation helpful? Give feedback.
-
|
but a workaround is to provide default empty lists: def generate_dataset(
image_dir: List[Path] = [],
labels_dir: List[Path] = [],
):
pass |
Beta Was this translation helpful? Give feedback.
-
|
Hi, was there any resolution to this? |
Beta Was this translation helpful? Give feedback.
-
|
For me the workaround above was ok. If you want to force a minimum of one item in the list, the options must be def generate_dataset(
image_dir: List[Path] = typer.Option(...),
labels_dir: List[Path] = typer.Option(...),
):
pass |
Beta Was this translation helpful? Give feedback.
-
|
I am working with typer 0.16.0 and I have the same issues and none of the workarounds function anymore. I am trying to use 2 arguments with type |
Beta Was this translation helpful? Give feedback.
-
|
I think we should update the docs to explicitly state that there should be at most 1 Current error message |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Hi, I tried to define two arguments as
List[str], and I got an exception from Click.To Reproduce
main.pywith:Expected behavior
I know wat I am doing cannot work, but I expect either:
otherbecausenameswallow all parameters)The error from Click is not very explicit.
Beta Was this translation helpful? Give feedback.
All reactions