We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ce34f2 commit fb240d2Copy full SHA for fb240d2
1 file changed
docs/parameter-types.rst
@@ -33,8 +33,8 @@ Example:
33
import enum
34
35
class HashType(enum.Enum):
36
- MD5 = 'MD5'
37
- SHA1 = 'SHA1'
+ MD5 = enum.auto()
+ SHA1 = enum.auto()
38
39
@click.command()
40
@click.option('--hash-type',
@@ -54,9 +54,8 @@ What it looks like:
54
println()
55
invoke(digest, args=['--help'])
56
57
-Since version 8.2.0 any iterable may be passed to :class:`Choice`, here
58
-an ``Enum`` is used which will result in all enum values to be valid
59
-choices.
+Any iterable may be passed to :class:`Choice`. If an ``Enum`` is passed, the
+names of the enum members will be used as valid choices.
60
61
Choices work with options that have ``multiple=True``. If a ``default``
62
value is given with ``multiple=True``, it should be a list or tuple of
0 commit comments