I'm trying to make a
@click.Option('--verbosity', default=1, type=click.Choice([0, 1, 2]))
TypeError: sequence item 0: expected str instance, int found
You can use
class click.IntRange(min=None, max=None, clamp=False)
A parameter that works similar to click.INT but restricts the value to fit into a range. The default behavior is to fail if the value falls outside the range, but it can also be silently clamped between the two edges.