Skip to content

Commit 0808867

Browse files
committed
docs: Add discrete mocking section
To make this more obvious. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 8381e90 commit 0808867

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

docs/usage.rst

+15-11
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ Once enabled, *sphinx-click* enables automatic documentation for
5959
their options and their environment variables using the `Sphinx standard
6060
domain`_.
6161

62-
*sphinx-click* allows for modules to be mocked out using the same method used by
63-
`sphinx.ext.autodoc`_. Modules to mock while the documentation is being built
64-
can be specified using the ``sphinx_click_mock_imports`` config value, if specified.
65-
Otherwise the value of ``autodoc_mock_imports`` is used, following the behavior
66-
of ``sphinx.ext.autosummary``. The value of this config option should be a list
67-
of module names; see `sphinx.ext.autodoc`_ for more information.
68-
6962
.. _cross-referencing:
7063

7164
Cross-referencing
@@ -97,9 +90,22 @@ Programs
9790

9891
__ https://github.com/sphinx-doc/sphinx/issues/880
9992

93+
.. _mocking:
10094

101-
Docstring processing
102-
--------------------
95+
Mocking
96+
-------
97+
98+
*sphinx-click* allows for modules to be mocked out using the same method used by
99+
`sphinx.ext.autodoc`_. Modules to mock while the documentation is being built
100+
can be specified using the ``sphinx_click_mock_imports`` config value, if specified.
101+
Otherwise the value of ``autodoc_mock_imports`` is used, following the behavior
102+
of ``sphinx.ext.autosummary``. The value of this config option should be a list
103+
of module names; see `sphinx.ext.autodoc`_ for more information.
104+
105+
.. _events:
106+
107+
Events
108+
------
103109

104110
*sphinx-click* provides the following additional events:
105111

@@ -129,7 +135,6 @@ modify **in place** to change what Sphinx puts into the output.
129135
def setup(app):
130136
app.connect("sphinx-click-process-description", process_description)
131137
132-
133138
Example
134139
-------
135140

@@ -233,7 +238,6 @@ using *sphinx-click* and the following directive:
233238
This will render the subcommands of each group in different sections, one for each
234239
group in ``sources``. An example is provided in :doc:`examples/commandcollections`.
235240

236-
237241
Modifying ``sys.path``
238242
----------------------
239243

0 commit comments

Comments
 (0)