summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-01-26 12:45:07 +0100
committerGitHub <noreply@github.com>2024-01-26 12:45:07 +0100
commit305757aec19c9d5111e4d76095ae0acd66163e4b (patch)
tree04aa017e66c06b3b19cb466ed4e1d73cd871523d /django/utils
parent3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff)
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/archive.py1
-rw-r--r--django/utils/cache.py1
-rw-r--r--django/utils/crypto.py1
-rw-r--r--django/utils/dateformat.py1
-rw-r--r--django/utils/deconstruct.py8
-rw-r--r--django/utils/feedgenerator.py1
-rw-r--r--django/utils/jslex.py1
-rw-r--r--django/utils/regex_helper.py1
-rw-r--r--django/utils/translation/__init__.py1
-rw-r--r--django/utils/translation/trans_real.py1
10 files changed, 14 insertions, 3 deletions
diff --git a/django/utils/archive.py b/django/utils/archive.py
index 71ec2d0015..56f34c0038 100644
--- a/django/utils/archive.py
+++ b/django/utils/archive.py
@@ -21,6 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
+
import os
import shutil
import stat
diff --git a/django/utils/cache.py b/django/utils/cache.py
index cf797d0279..3b014fbe51 100644
--- a/django/utils/cache.py
+++ b/django/utils/cache.py
@@ -14,6 +14,7 @@ cache keys to prevent delivery of wrong content.
An example: i18n middleware would need to distinguish caches by the
"Accept-language" header.
"""
+
import time
from collections import defaultdict
from hashlib import md5
diff --git a/django/utils/crypto.py b/django/utils/crypto.py
index 1c0e7001c6..5134b854d6 100644
--- a/django/utils/crypto.py
+++ b/django/utils/crypto.py
@@ -1,6 +1,7 @@
"""
Django's standard crypto functions and utilities.
"""
+
import hashlib
import hmac
import secrets
diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py
index a6c315e4cf..a3274b901c 100644
--- a/django/utils/dateformat.py
+++ b/django/utils/dateformat.py
@@ -10,6 +10,7 @@ Usage:
7th October 2003 11:39
>>>
"""
+
import calendar
from datetime import date, datetime, time
from email.utils import format_datetime as format_datetime_rfc5322
diff --git a/django/utils/deconstruct.py b/django/utils/deconstruct.py
index f8754c1974..2e5463a651 100644
--- a/django/utils/deconstruct.py
+++ b/django/utils/deconstruct.py
@@ -42,9 +42,11 @@ def deconstructible(*args, path=None):
"#serializing-values" % (name, module_name, get_docs_version())
)
return (
- path
- if path and type(obj) is klass
- else f"{obj.__class__.__module__}.{name}",
+ (
+ path
+ if path and type(obj) is klass
+ else f"{obj.__class__.__module__}.{name}"
+ ),
obj._constructor_args[0],
obj._constructor_args[1],
)
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
index 31ca9a2db9..3bd456ca68 100644
--- a/django/utils/feedgenerator.py
+++ b/django/utils/feedgenerator.py
@@ -21,6 +21,7 @@ Sample usage:
For definitions of the different versions of RSS, see:
https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004/02/04/incompatible-rss
"""
+
import datetime
import email
from io import StringIO
diff --git a/django/utils/jslex.py b/django/utils/jslex.py
index 93a1a2e972..fc46a686c7 100644
--- a/django/utils/jslex.py
+++ b/django/utils/jslex.py
@@ -1,4 +1,5 @@
"""JsLex: a lexer for JavaScript"""
+
# Originally from https://bitbucket.org/ned/jslex
import re
diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py
index 9ee82e1a9b..b71298e399 100644
--- a/django/utils/regex_helper.py
+++ b/django/utils/regex_helper.py
@@ -5,6 +5,7 @@ Used internally by Django and not intended for external use.
This is not, and is not intended to be, a complete reg-exp decompiler. It
should be good enough for a large class of URLS, however.
"""
+
import re
from django.utils.functional import SimpleLazyObject
diff --git a/django/utils/translation/__init__.py b/django/utils/translation/__init__.py
index 0b3f78e486..0618f02159 100644
--- a/django/utils/translation/__init__.py
+++ b/django/utils/translation/__init__.py
@@ -1,6 +1,7 @@
"""
Internationalization support.
"""
+
from contextlib import ContextDecorator
from decimal import ROUND_UP, Decimal
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 872c80b00f..a629528717 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -1,4 +1,5 @@
"""Translation helper functions."""
+
import functools
import gettext as gettext_module
import os