summaryrefslogtreecommitdiff
path: root/docs/internals/contributing/writing-documentation.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/internals/contributing/writing-documentation.txt')
-rw-r--r--docs/internals/contributing/writing-documentation.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/internals/contributing/writing-documentation.txt b/docs/internals/contributing/writing-documentation.txt
index a89ea050d5..3e6b846a7a 100644
--- a/docs/internals/contributing/writing-documentation.txt
+++ b/docs/internals/contributing/writing-documentation.txt
@@ -211,6 +211,9 @@ documentation:
"last bit" of that path. So ``:mod:`~django.contrib.auth``` will
display a link with the title "auth".
+* All Python code blocks should be formatted using the `blacken-docs`_
+ auto-formatter. This will be run by ``pre-commit`` if that is configured.
+
* Use :mod:`~sphinx.ext.intersphinx` to reference Python's and Sphinx'
documentation.
@@ -258,6 +261,13 @@ documentation:
also need to define a reference to the documentation for that environment
variable using :rst:dir:`.. envvar:: <envvar>`.
+.. versionchanged:: 4.2
+
+ All Python code blocks in the Django documentation were reformatted with
+ `blacken-docs`_.
+
+.. _blacken-docs: https://pypi.org/project/blacken-docs/
+
Django-specific markup
======================