Skip to content

Commit

Permalink
Fix docs example.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBackx committed Dec 22, 2024
1 parent efa693e commit 902d690
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions docs/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ Example:

.. click:example::
class HashType:
import enum

class HashType(enum.Enum):
MD5 = 'MD5'
SHA1 = 'SHA1'

Expand Down Expand Up @@ -411,8 +413,8 @@ Choices work with options that have ``multiple=True``. If a ``default``
value is given with ``multiple=True``, it should be a list or tuple of
valid choices.

Choices should be unique after considering the effects of
``case_sensitive`` and any specified token normalization function.
Choices should be unique after normalization, see
:meth:`Choice.normalize_choice` for more info.

.. versionchanged:: 7.1
The resulting value from an option will always be one of the
Expand Down
2 changes: 1 addition & 1 deletion src/click/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class Choice(ParamType, t.Generic[ParamTypeValue]):
tuple.
.. versionadded:: 8.2.0
Choices are normalized via :meth:`normalize_choice`
Choice normalization can be overridden via :meth:`normalize_choice`.
"""

name = "choice"
Expand Down

0 comments on commit 902d690

Please sign in to comment.