mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
This commit is contained in:
@@ -109,9 +109,11 @@ class ModelIterable(BaseIterable):
|
||||
related_objs,
|
||||
operator.attrgetter(
|
||||
*[
|
||||
field.attname
|
||||
if from_field == "self"
|
||||
else queryset.model._meta.get_field(from_field).attname
|
||||
(
|
||||
field.attname
|
||||
if from_field == "self"
|
||||
else queryset.model._meta.get_field(from_field).attname
|
||||
)
|
||||
for from_field in field.from_fields
|
||||
]
|
||||
),
|
||||
@@ -1391,9 +1393,7 @@ class QuerySet(AltersData):
|
||||
clone._iterable_class = (
|
||||
NamedValuesListIterable
|
||||
if named
|
||||
else FlatValuesListIterable
|
||||
if flat
|
||||
else ValuesListIterable
|
||||
else FlatValuesListIterable if flat else ValuesListIterable
|
||||
)
|
||||
return clone
|
||||
|
||||
@@ -1659,9 +1659,11 @@ class QuerySet(AltersData):
|
||||
if names is None:
|
||||
names = set(
|
||||
chain.from_iterable(
|
||||
(field.name, field.attname)
|
||||
if hasattr(field, "attname")
|
||||
else (field.name,)
|
||||
(
|
||||
(field.name, field.attname)
|
||||
if hasattr(field, "attname")
|
||||
else (field.name,)
|
||||
)
|
||||
for field in self.model._meta.get_fields()
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user