Skip to content

Commit 876c7cd

Browse files
author
kyu243
committed
Update docs for enum choice
1 parent 9ce34f2 commit 876c7cd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/parameter-types.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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,8 +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
57+
Any iterable may be passed to :class:`Choice`. Here
58+
an ``Enum`` is used which will result in all enum names to be valid
5959
choices.
6060

6161
Choices work with options that have ``multiple=True``. If a ``default``

0 commit comments

Comments
 (0)