summaryrefslogtreecommitdiff
path: root/django/contrib/contenttypes
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2025-07-22 20:41:41 -0700
committernessita <124304+nessita@users.noreply.github.com>2025-07-23 20:17:55 -0300
commit69a93a88edb56ba47f624dac7a21aacc47ea474f (patch)
treef57507a4435d032493cae40e06ecb254790b67b2 /django/contrib/contenttypes
parent55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff)
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.
Diffstat (limited to 'django/contrib/contenttypes')
-rw-r--r--django/contrib/contenttypes/admin.py4
-rw-r--r--django/contrib/contenttypes/fields.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/django/contrib/contenttypes/admin.py b/django/contrib/contenttypes/admin.py
index 617d6d2e81..f595ce5285 100644
--- a/django/contrib/contenttypes/admin.py
+++ b/django/contrib/contenttypes/admin.py
@@ -67,8 +67,8 @@ class GenericInlineModelAdminChecks(InlineModelAdminChecks):
)
]
- # There's one or more GenericForeignKeys; make sure that one of them
- # uses the right ct_field and ct_fk_field.
+ # There's one or more GenericForeignKeys; make sure that one of
+ # them uses the right ct_field and ct_fk_field.
for gfk in gfks:
if gfk.ct_field == obj.ct_field and gfk.fk_field == obj.ct_fk_field:
return []
diff --git a/django/contrib/contenttypes/fields.py b/django/contrib/contenttypes/fields.py
index f28c346576..d85b61933a 100644
--- a/django/contrib/contenttypes/fields.py
+++ b/django/contrib/contenttypes/fields.py
@@ -199,8 +199,9 @@ class GenericForeignKey(FieldCacheMixin, Field):
ct = self.get_content_type(id=ct_id, using=instance._state.db)
ret_val.extend(ct.get_all_objects_for_this_type(pk__in=fkeys))
- # For doing the join in Python, we have to match both the FK val and the
- # content type, so we use a callable that returns a (fk, class) pair.
+ # For doing the join in Python, we have to match both the FK val and
+ # the content type, so we use a callable that returns a (fk, class)
+ # pair.
def gfk_key(obj):
ct_id = getattr(obj, ct_attname)
if ct_id is None: