Empty tuple returned for Option instead of expected None
when no values passed
#410
Closed
7 tasks done
Labels
bug
Something isn't working
First Check
Commit to Help
Example Code
Description
If an option is declared as
foo: Optional[List[str]] = typer.Option(None)
it should provideNone
if nothing is passed. Currently it is providing()
, an empty tuple.In comparison
bar: Optional[str] = typer.Option(None)
does provideNone
when missing, as expected.Nothing passed causes the returned value for
foo
to be an empty tuple, it should beNone
:Passing values it returns a tuple of the values
Operating System
macOS
Operating System Details
No response
Typer Version
0.4.1
Python Version
3.10.0
Additional Context
#127 (comment)
The text was updated successfully, but these errors were encountered: