Skip to content
Myr

eval-rst switched to native MyST

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

authored by Veritia · committed by Veritia · parent 5aa9850 · Browse files · 1 file+4 added−7 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−7 removed

  • other:+4 added−7 removed

1 file+4 added−7 removed

modified:docs/advanced.md+4 added-7 removed
1# Advanced Patterns23```{eval-rst}4.. currentmodule:: click3```{currentmodule} click4```56In addition to common functionality, Click offers some advanced features.7
43 unmodified lines
51 def hello():52 click.echo('Hello World!')535456# What it looks like:55What it looks like:565758.. click:run::59
8 unmodified lines
68this case, because we would exit the program, we instead do nothing.6970## Callbacks for Validation7173```{eval-rst}74.. versionchanged:: 2.072```{versionchanged} 2.073```7475If you want to apply custom validation logic, you can do this in the76parameter callbacks. These callbacks can both modify values and
93 unmodified lines
170```171172## Token Normalization173176```{eval-rst}177.. versionadded:: 2.0174```{versionadded} 2.0175```176177Starting with Click 2.0, it's possible to provide a function used178for normalizing tokens. Tokens are option names, choice values, or command
237 unmodified lines