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

Refs #36500 -- Rewrapped long docstrings and block comments via a script.

Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
This commit is contained in:
django-bot
2025-07-22 20:41:41 -07:00
committed by nessita
parent 55b0cc2131
commit 69a93a88ed
378 changed files with 2781 additions and 1861 deletions

View File

@@ -61,7 +61,8 @@ class AbstractInheritanceTests(SimpleTestCase):
def test_diamond_shaped_multiple_inheritance_is_depth_first(self):
"""
In contrast to standard Python MRO, resolution of inherited fields is
strictly depth-first, rather than breadth-first in diamond-shaped cases.
strictly depth-first, rather than breadth-first in diamond-shaped
cases.
This is because a copy of the parent field descriptor is placed onto
the model class in ModelBase.__new__(), rather than the attribute

View File

@@ -81,7 +81,8 @@ class ModelInheritanceTests(TestCase):
Restaurant.objects.filter(supplier__name="foo")
def test_model_with_distinct_accessors(self):
# The Post model has distinct accessors for the Comment and Link models.
# The Post model has distinct accessors for the Comment and Link
# models.
post = Post.objects.create(title="Lorem Ipsum")
post.attached_comment_set.create(content="Save $ on V1agr@", is_spam=True)
post.attached_link_set.create(
@@ -194,7 +195,8 @@ class ModelInheritanceTests(TestCase):
with CaptureQueriesContext(connection) as captured_queries:
Place.objects.filter(pk=supplier.pk).update(name=supplier.name)
expected_sql = captured_queries[0]["sql"]
# Capture the queries executed when a subclassed model instance is saved.
# Capture the queries executed when a subclassed model instance is
# saved.
with CaptureQueriesContext(connection) as captured_queries:
supplier.save(update_fields=("name",))
for query in captured_queries: