Skip to content
Myr

Docs: fix small mistake in section on callbacks

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

The documentation still referred to only two parameters being passed to a parameter callback, whereas the new signature takes three.

authored by Sebastiaan Huber · committed by David Lord · parent e48c391 · Browse files · 1 file+4 added−4 removed
This commit

State

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

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:docs/options.rst+4 added-4 removed
536 unmodified lines
537parameter ``--foo`` was required and defined before, you would need to538specify it for ``--version`` to work. For more information, see539:ref:`callback-evaluation-order`.540541A callback is a function that is invoked with two parameters: the current542:class:`Context` and the value. The context provides some useful features543such as quitting the application and gives access to other already544processed parameters.541A callback is a function that is invoked with three parameters: the542current :class:`Context`, the current :class:`Parameter`, and the value.543The context provides some useful features such as quitting the544application and gives access to other already processed parameters.545546Here an example for a ``--version`` flag:547548.. click:example::
366 unmodified lines