summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2023-02-01 07:13:39 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-02-01 11:52:33 +0100
commite565a5cd187197a6349e55d7a4c68a9e12e2fd20 (patch)
tree7c4f7a507f80833bd17f59b7d5ca723bcdc349da /django/core
parent4cf73314c4704509a7587b3f24201cf179d64f79 (diff)
[4.0.x] Refs #33476 -- Applied Black's 2023 stable style.
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main.
Diffstat (limited to 'django/core')
-rw-r--r--django/core/cache/backends/db.py1
-rw-r--r--django/core/management/commands/dumpdata.py2
-rw-r--r--django/core/management/commands/squashmigrations.py1
-rw-r--r--django/core/management/templates.py1
-rw-r--r--django/core/serializers/python.py3
5 files changed, 2 insertions, 6 deletions
diff --git a/django/core/cache/backends/db.py b/django/core/cache/backends/db.py
index c6bdb45709..e1d4a62b51 100644
--- a/django/core/cache/backends/db.py
+++ b/django/core/cache/backends/db.py
@@ -40,7 +40,6 @@ class BaseDatabaseCache(BaseCache):
class DatabaseCache(BaseDatabaseCache):
-
# This class uses cursors provided by the database connection. This means
# it reads expiration values as aware or naive datetimes, depending on the
# value of USE_TZ and whether the database supports time zones. The ORM's
diff --git a/django/core/management/commands/dumpdata.py b/django/core/management/commands/dumpdata.py
index 038b82698d..cc183517e3 100644
--- a/django/core/management/commands/dumpdata.py
+++ b/django/core/management/commands/dumpdata.py
@@ -193,7 +193,7 @@ class Command(BaseCommand):
# There is no need to sort dependencies when natural foreign
# keys are not used.
models = []
- for (app_config, model_list) in app_list.items():
+ for app_config, model_list in app_list.items():
if model_list is None:
models.extend(app_config.get_models())
else:
diff --git a/django/core/management/commands/squashmigrations.py b/django/core/management/commands/squashmigrations.py
index 2529c4d5de..9e5afe55d3 100644
--- a/django/core/management/commands/squashmigrations.py
+++ b/django/core/management/commands/squashmigrations.py
@@ -56,7 +56,6 @@ class Command(BaseCommand):
)
def handle(self, **options):
-
self.verbosity = options["verbosity"]
self.interactive = options["interactive"]
app_label = options["app_label"]
diff --git a/django/core/management/templates.py b/django/core/management/templates.py
index 32ceee89d7..d3208e660f 100644
--- a/django/core/management/templates.py
+++ b/django/core/management/templates.py
@@ -150,7 +150,6 @@ class TemplateCommand(BaseCommand):
prefix_length = len(template_dir) + 1
for root, dirs, files in os.walk(template_dir):
-
path_rest = root[prefix_length:]
relative_dir = path_rest.replace(base_name, name)
if relative_dir:
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py
index a3918bf9d2..c15d412846 100644
--- a/django/core/serializers/python.py
+++ b/django/core/serializers/python.py
@@ -122,8 +122,7 @@ def Deserializer(
field_names = field_names_cache[Model]
# Handle each field
- for (field_name, field_value) in d["fields"].items():
-
+ for field_name, field_value in d["fields"].items():
if ignorenonexistent and field_name not in field_names:
# skip fields no longer on model
continue