Skip to content
Myr

Use code-block for doc examples which cannot run

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

The new LazyGroup example docs can't run because they rely on a multi-module setup. Instead, use code-block decoration.

authored by Stephen Rosen · committed by David Lord · parent 0e9c98a · 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/complex.rst+2 added-2 removed
243 unmodified lines
244245The following :class:`Group` subclass adds an attribute, ``lazy_subcommands``, which246stores a mapping from subcommand names to the information for importing them.247248.. click:example::248.. code-block:: python249250 # in lazy_group.py251 import importlib252 import click
38 unmodified lines
291292With ``LazyGroup`` defined, it's now possible to write a group which lazily loads its293subcommands like so:294295.. click:example::295.. code-block:: python296297 # in main.py298 import click299 from lazy_group import LazyGroup
84 unmodified lines