Apply Black to code examples in documentation, refs #1718

Uses blacken-docs. This has a deliberate error which I hope will fail CI.
This commit is contained in:
Simon Willison 2022-04-24 08:50:43 -07:00
commit 36573638b0
5 changed files with 81 additions and 41 deletions

View file

@ -144,6 +144,15 @@ If any of your code does not conform to Black you can run this to automatically
All done! ✨ 🍰 ✨
1 file reformatted, 94 files left unchanged.
.. _contributing_formatting_blacken_docs:
blacken-docs
~~~~~~~~~~~~
The `blacken-docs <https://pypi.org/project/blacken-docs/>`__ command applies Black formatting rules to code examples in the documentation. Run it like this::
blacken-docs -l 60 docs/*.rst
.. _contributing_formatting_prettier:
Prettier