diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2026-01-18 21:26:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-18 21:26:56 +0100 |
| commit | 6cff02078799b7c683a0d39630d49ab4fe532e7c (patch) | |
| tree | 9813fc94d952942117b23d61231b9e89a8cab1c2 /docs | |
| parent | 0d31ca98830542088299d2078402891d08cc3a65 (diff) | |
Applied Black's 2026 stable style.
https://github.com/psf/black/releases/tag/26.1.0
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 0a946b7c50..49b9939036 100644 --- a/docs/howto/custom-template-tags.txt +++ b/docs/howto/custom-template-tags.txt @@ -599,7 +599,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 15bfc6641f..44383b24a1 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -1072,8 +1072,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"]], @@ -1082,8 +1081,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 29083c0b6b..b3d84e9bfd 100644 --- a/docs/ref/contrib/postgres/constraints.txt +++ b/docs/ref/contrib/postgres/constraints.txt @@ -105,7 +105,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)) |
