Support for the literal type (python 3.8 or via typing_extensions) would be nice. Eg.
def get_list(output: Literal["raw", "json", "yaml"] = "raw"):
if output == "json":
typer.echo(json.dumps([1, 2, 3]))
The only workarounds (using string or multiple bool flags + validating input) are ugly now.
Support for the literal type (python 3.8 or via typing_extensions) would be nice. Eg.
The only workarounds (using string or multiple bool flags + validating input) are ugly now.