1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[4.2.x] Refs #34140 -- Added configurations to run blacken-docs linter and adjusted docs.

This adds:
- GitHub actions,
- tox configuration,
- pre-commit hook, and
- makefile rules
to run blacken-docs linter.

Co-authored-by: David Smith <smithdc@gmail.com>

Backport of 6015bab80e from main
This commit is contained in:
Mariusz Felisiak
2023-02-28 13:14:51 +01:00
parent 8d2ac000e4
commit 32f224e359
9 changed files with 75 additions and 8 deletions

View File

@@ -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
======================