diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2026-01-18 21:26:56 +0100 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2026-02-24 20:36:09 -0300 |
| commit | 090f1da56e663e9f840e307e73b5cf011cb7b061 (patch) | |
| tree | 2283f72766c60c9462aa718fbe039ffdd3478ad3 /docs | |
| parent | 5f8b8e96a7a43d9e95c2deda3cf0c2855d976c64 (diff) | |
[6.0.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.py | 11 | ||||
| -rw-r--r-- | docs/howto/custom-template-tags.txt | 1 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/gdal.txt | 6 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/constraints.txt | 1 | ||||
| -rw-r--r-- | docs/topics/db/sql.txt | 7 | ||||
| -rw-r--r-- | docs/topics/tasks.txt | 2 |
6 files changed, 8 insertions, 20 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">/</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"></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 b0f59ef981..7deb33ec69 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 f0bb719ca0..cff7b3bedb 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -1078,8 +1078,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"]], @@ -1088,8 +1087,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 6aafa2c3b5..bd34df8bb7 100644 --- a/docs/topics/db/sql.txt +++ b/docs/topics/db/sql.txt @@ -121,15 +121,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. diff --git a/docs/topics/tasks.txt b/docs/topics/tasks.txt index 96deac6dc3..06e83af0bc 100644 --- a/docs/topics/tasks.txt +++ b/docs/topics/tasks.txt @@ -207,7 +207,6 @@ To receive the Task context as an argument to your Task function, pass from django.core.mail import send_mail from django.tasks import task - logger = logging.getLogger(__name__) @@ -328,7 +327,6 @@ committed to the database, use :func:`transaction.on_commit() from django.db import transaction - with transaction.atomic(): Thing.objects.create(num=1) transaction.on_commit(partial(my_task.enqueue, thing_num=1)) |
