Skip to content

Commit

Permalink
docs: add method documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 26, 2024
1 parent 5690f7b commit 0fb1d4c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 257 deletions.
109 changes: 0 additions & 109 deletions src/click.egg-info/PKG-INFO

This file was deleted.

140 changes: 0 additions & 140 deletions src/click.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/click.egg-info/dependency_links.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/click.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/click.egg-info/top_level.txt

This file was deleted.

6 changes: 6 additions & 0 deletions src/click/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ def convert(
self.fail(self.get_invalid_choice_message(value), param, ctx)

def get_invalid_choice_message(self, value: t.Any) -> str:
"""Get the error message when the given choice is invalid.
:param value: The invalid value.
:return: Error message for the invalid choice.
"""
choices_str = ", ".join(map(repr, self.choices))
return ngettext(
"{value!r} is not {choice}.",
Expand Down

0 comments on commit 0fb1d4c

Please sign in to comment.