summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2026-01-18 21:26:56 +0100
committerJacob Walls <jacobtylerwalls@gmail.com>2026-03-30 15:55:07 -0400
commit0ee44c674cf61efbca2056c40f3e4f2335aaeee6 (patch)
treea27edf3c3c9ee9c50ba78df9e158b28be408a8bb /docs
parent89b4d944f7e331e267aa1030e295f29355b78172 (diff)
[5.2.x] Applied Black's 2026 stable style.
https://github.com/psf/black/releases/tag/26.1.0 Backport of 6cff02078799b7c683a0d39630d49ab4fe532e7c from main.
Diffstat (limited to 'docs')
-rw-r--r--docs/_ext/djangodocs.py11
-rw-r--r--docs/howto/custom-template-tags.txt1
-rw-r--r--docs/ref/contrib/gis/gdal.txt6
-rw-r--r--docs/ref/contrib/postgres/constraints.txt1
-rw-r--r--docs/topics/db/sql.txt7
5 files changed, 8 insertions, 18 deletions
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
index 77e24ff0eb..a979a8e30a 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -83,9 +83,7 @@ class VersionDirective(Directive):
if len(self.arguments) > 1:
msg = """Only one argument accepted for directive '{directive_name}::'.
Comments should be provided as content,
- not as an extra argument.""".format(
- directive_name=self.name
- )
+ not as an extra argument.""".format(directive_name=self.name)
raise self.error(msg)
env = self.state.document.settings.env
@@ -255,17 +253,14 @@ def visit_console_html(self, node):
# has been used on it.
self.document._console_directive_used_flag = True
uid = node["uid"]
- self.body.append(
- """\
+ self.body.append("""\
<div class="console-block" id="console-block-%(id)s">
<input class="c-tab-unix" id="c-tab-%(id)s-unix" type="radio" name="console-%(id)s" \
checked>
<label for="c-tab-%(id)s-unix" title="Linux/macOS">&#xf17c/&#xf179</label>
<input class="c-tab-win" id="c-tab-%(id)s-win" type="radio" name="console-%(id)s">
<label for="c-tab-%(id)s-win" title="Windows">&#xf17a</label>
-<section class="c-content-unix" id="c-content-%(id)s-unix">\n"""
- % {"id": uid}
- )
+<section class="c-content-unix" id="c-content-%(id)s-unix">\n""" % {"id": uid})
try:
self.visit_literal_block(node)
except nodes.SkipNode:
diff --git a/docs/howto/custom-template-tags.txt b/docs/howto/custom-template-tags.txt
index b5577eef7b..0d2e8f6ecb 100644
--- a/docs/howto/custom-template-tags.txt
+++ b/docs/howto/custom-template-tags.txt
@@ -601,7 +601,6 @@ implemented using a ``simple_block_tag`` as follows:
from django import template
from django.utils.html import format_html
-
register = template.Library()
diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt
index 726cd83756..5af3f02941 100644
--- a/docs/ref/contrib/gis/gdal.txt
+++ b/docs/ref/contrib/gis/gdal.txt
@@ -1100,8 +1100,7 @@ Coordinate System Objects
>>> wgs84 = SpatialReference("EPSG:4326") # EPSG string
>>> proj = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "
>>> wgs84 = SpatialReference(proj) # PROJ string
- >>> wgs84 = SpatialReference(
- ... """GEOGCS["WGS 84",
+ >>> wgs84 = SpatialReference("""GEOGCS["WGS 84",
... DATUM["WGS_1984",
... SPHEROID["WGS 84",6378137,298.257223563,
... AUTHORITY["EPSG","7030"]],
@@ -1110,8 +1109,7 @@ Coordinate System Objects
... AUTHORITY["EPSG","8901"]],
... UNIT["degree",0.01745329251994328,
... AUTHORITY["EPSG","9122"]],
- ... AUTHORITY["EPSG","4326"]]"""
- ... ) # OGC WKT
+ ... AUTHORITY["EPSG","4326"]]""") # OGC WKT
.. method:: __getitem__(target)
diff --git a/docs/ref/contrib/postgres/constraints.txt b/docs/ref/contrib/postgres/constraints.txt
index 4d13eddd24..aa8a1a5aed 100644
--- a/docs/ref/contrib/postgres/constraints.txt
+++ b/docs/ref/contrib/postgres/constraints.txt
@@ -101,7 +101,6 @@ are ``Deferrable.DEFERRED`` or ``Deferrable.IMMEDIATE``. For example::
from django.contrib.postgres.fields import RangeOperators
from django.db.models import Deferrable
-
ExclusionConstraint(
name="exclude_overlapping_deferred",
expressions=[
diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt
index 42143fd118..f55572be0d 100644
--- a/docs/topics/db/sql.txt
+++ b/docs/topics/db/sql.txt
@@ -120,15 +120,14 @@ had ``Person`` data in it, you could easily map it into ``Person`` instances:
.. code-block:: pycon
- >>> Person.objects.raw(
- ... """
+ >>> Person.objects.raw("""
... SELECT first AS first_name,
... last AS last_name,
... bd AS birth_date,
... pk AS id,
... FROM some_other_table
- ... """
- ... )
+ ... """)
+ ...
As long as the names match, the model instances will be created correctly.