Closed
Description
I have an option that is a list of bool
s, but I'm pairing each boolean value with another multiple
option. So I do actually need a list of booleans and not just a count of values because order matters.
I'm not using is_flag
, but I assume this translates to the same under the hood.
@click.option(
"--collection/--single",
"-c/-s",
type=bool,
default=[False],
count=True,
help=(
"Is a file a collection of books? Add once for every file included. "
"Consumed in order of files."
),
)
@click.option(
"--file",
"-f",
required=True,
type=click.Path(
exists=True, readable=True, dir_okay=False, allow_dash=True, path_type=str
),
multiple=True,
help=(
"The path of the input file. Note: Every file must be pa
5E3B
ired with a language. "
"And the pairs will be processed left to right."
),
)
Environment:
Python version: 3.9.7.1
Click version: 8.1.3
Is there an alternative way I should be doing this? If not #2246 breaks my code.
Metadata
Metadata
Assignees
Labels
No labels