Skip to content
Myr

Improve docs for Choice type (addresses issue #892) (#900)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Stefan Scherfke · committed by Armin Ronacher · parent 570db30 · Browse files · 2 files+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−0 removed

  • other:+8 added−0 removed

2 files+8 added−0 removed

modified:click/types.py+3 added
127 unmodified lines
128class Choice(ParamType):129 """The choice type allows a value to be checked against a fixed set of130 supported values. All of these values have to be strings.131132 You should only pass *choices* as list or tuple. Other iterables (like133 generators) may lead to surprising results.134135 See :ref:`choice-opts` for an example.136 """137 name = 'choice'138
456 unmodified lines
modified:docs/options.rst+5 added
290 unmodified lines
291 invoke(digest, args=['--hash-type=foo'])292 println()293 invoke(digest, args=['--help'])294295.. note::296297 You should only pass the choices as list or tuple. Other iterables (like298 generators) may lead to surprising results.299300.. _option-prompting:301302Prompting303---------
407 unmodified lines