Skip to content

Commit 5ba7308

Browse files
committed
Add blacken-docs to formatting-tools
1 parent f779ca2 commit 5ba7308

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/source/doc-style/formatting-tools.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ Most of the tools presented can be configured using :ref:`the
1111
cleaner root project directory.
1212

1313

14+
Blacken-Docs
15+
------------
16+
17+
When writing documentation, it is frequent to include code-blocks which are used
18+
as examples. However, these code snippets cannot be tested with the usual code
19+
formatting tools. This is where `blacken-docs`_ comes into play. You can execute
20+
this tool by running:
21+
22+
.. code:: bash
23+
24+
blacken-docs -l <line-length> doc/**/*.rst
25+
26+
1427
Codespell
1528
---------
1629

@@ -124,6 +137,7 @@ under the ``[tool.pydocstyle]`` entry:
124137
convention = "numpy"
125138
126139
140+
.. _blacken-docs: https://github.com/asottile/blacken-docs
127141
.. _interrogate: https://interrogate.readthedocs.io/en/latest/
128142
.. _docstr-coverage: https://docstr-coverage.readthedocs.io/en/latest/index.html
129143
.. _docstring-coverage: https://bitbucket.org/DataGreed/docstring-coverage/wiki/Home

0 commit comments

Comments
 (0)