File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ Example:
3333 import enum
3434
3535 class HashType(enum.Enum):
36- MD5 = 'MD5'
37- SHA1 = 'SHA1'
36+ MD5 = enum.auto()
37+ SHA1 = enum.auto()
3838
3939 @click.command()
4040 @click.option('--hash-type',
@@ -54,9 +54,8 @@ What it looks like:
5454 println()
5555 invoke(digest, args=['--help'])
5656
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.
57+ Any iterable may be passed to :class: `Choice `. If an ``Enum `` is passed, the
58+ names of the enum members will be used as valid choices.
6059
6160Choices work with options that have ``multiple=True ``. If a ``default ``
6261value is given with ``multiple=True ``, it should be a list or tuple of
You can’t perform that action at this time.
0 commit comments