Skip to content
Myr

Fixed the description of `is_flag=False, flag_value=value`

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

The text had "only if", but the example shows that the behavior "if only" the flag is given, is to return the `flag_value`.

authored by Bob Kerns · committed by GitHub · parent 2d610e3 · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/options.md+2 added-2 removed
430 unmodified lines
431providing only the option's flag without a value will either show a432prompt or use its `flag_value`.433434Setting `is_flag=False, flag_value=value` tells Click that the option435can still be passed a value, but only if the flag is given the436`flag_value`.435can still be passed a value, but if only the flag is given, the436value will be `flag_value`.437438```{eval-rst}439.. click:example::440
11 unmodified lines