First Check
Commit to Help
Example Code
import typer
app = typer.Typer()
@app.command()
def set_roles(
single: str = typer.Option(..., prompt=True),
multiple: list[str] = typer.Option(None, prompt=True),
):
typer.echo(f"{single}")
typer.echo(f"{multiple}")
if __name__ == "__main__":
app()
Description
When I run the example without passing any arguments, I cannot pass multiple arguments to the prompt for multiple that satisfies the script. How must I format these at the prompt?
Example:
> python example.py
Single: one
Multple: one, two
Error: Value must be an iterable.
Multple: one two
Error: Value must be an iterable.
Multple: "one" "tow"
Error: Value must be an iterable.
Multple: "one,two"
Error: Value must be an iterable.
Multple: one
Error: Value must be an iterable.
Multple: one
Error: Value must be an iterable.
Multple: "one"
Error: Value must be an iterable.
Multple: [one, two]
Error: Value must be an iterable.
Multple: ["one", "two"]
Error: Value must be an iterable.
Multple: "['one','two']
Error: Value must be an iterable.
Operating System
macOS
Operating System Details
No response
Typer Version
0.4.0
Python Version
Python 3.10.1
Additional Context
No response
First Check
Commit to Help
Example Code
Description
When I run the example without passing any arguments, I cannot pass multiple arguments to the prompt for
multiplethat satisfies the script. How must I format these at the prompt?Example:
Operating System
macOS
Operating System Details
No response
Typer Version
0.4.0
Python Version
Python 3.10.1
Additional Context
No response