diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-01-26 12:45:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 12:45:07 +0100 |
| commit | 305757aec19c9d5111e4d76095ae0acd66163e4b (patch) | |
| tree | 04aa017e66c06b3b19cb466ed4e1d73cd871523d /django/db/models/sql | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/compiler.py | 6 | ||||
| -rw-r--r-- | django/db/models/sql/datastructures.py | 1 | ||||
| -rw-r--r-- | django/db/models/sql/query.py | 1 | ||||
| -rw-r--r-- | django/db/models/sql/where.py | 1 |
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 |
