summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/compiler.py6
-rw-r--r--django/db/models/sql/datastructures.py1
-rw-r--r--django/db/models/sql/query.py1
-rw-r--r--django/db/models/sql/where.py1
4 files changed, 6 insertions, 3 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 10338259d5..9a0d2eb4e7 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -1224,9 +1224,9 @@ class SQLCompiler:
"field": f,
"reverse": False,
"local_setter": f.set_cached_value,
- "remote_setter": f.remote_field.set_cached_value
- if f.unique
- else lambda x, y: None,
+ "remote_setter": (
+ f.remote_field.set_cached_value if f.unique else lambda x, y: None
+ ),
"from_parent": False,
}
related_klass_infos.append(klass_info)
diff --git a/django/db/models/sql/datastructures.py b/django/db/models/sql/datastructures.py
index 5eaa8c25f6..7c0c14a46e 100644
--- a/django/db/models/sql/datastructures.py
+++ b/django/db/models/sql/datastructures.py
@@ -2,6 +2,7 @@
Useful auxiliary data structures for query construction. Not useful outside
the SQL domain.
"""
+
import warnings
from django.core.exceptions import FullResultSet
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index ce4fafb1e2..6e8813b5e7 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -6,6 +6,7 @@ themselves do not have to (and could be backed by things other than SQL
databases). The abstraction barrier only works one way: this module has to know
all about the internals of models in order to get the information it needs.
"""
+
import copy
import difflib
import functools
diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py
index 8423fcb528..0fded5cce3 100644
--- a/django/db/models/sql/where.py
+++ b/django/db/models/sql/where.py
@@ -1,6 +1,7 @@
"""
Code to manage the creation and SQL rendering of 'where' constraints.
"""
+
import operator
from functools import reduce