diff options
| author | David Smith <smithdc@gmail.com> | 2023-02-01 07:13:39 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-02-01 11:37:29 +0100 |
| commit | 80aae8343939e849100db87b1c9615f32b38ea0b (patch) | |
| tree | 266b80026685000c0fff56a677e0f4973e1699cc /django/utils | |
| parent | 8a7b22d4a623bcd95190d2f5a958472fb41e576d (diff) | |
[4.2.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/utils')
| -rw-r--r-- | django/utils/cache.py | 2 | ||||
| -rw-r--r-- | django/utils/decorators.py | 1 | ||||
| -rw-r--r-- | django/utils/numberformat.py | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/cache.py b/django/utils/cache.py index 2dd2c7796c..d9f96d8f7f 100644 --- a/django/utils/cache.py +++ b/django/utils/cache.py @@ -78,7 +78,7 @@ def patch_cache_control(response, **kwargs): elif "public" in cc and "private" in kwargs: del cc["public"] - for (k, v) in kwargs.items(): + for k, v in kwargs.items(): directive = k.replace("_", "-") if directive == "no-cache": # no-cache supports multiple field names. diff --git a/django/utils/decorators.py b/django/utils/decorators.py index 650247a7bb..735821d475 100644 --- a/django/utils/decorators.py +++ b/django/utils/decorators.py @@ -57,6 +57,7 @@ def method_decorator(decorator, name=""): """ Convert a function decorator into a method decorator """ + # 'obj' can be a class or a function. If 'obj' is a function at the time it # is passed to _dec, it will eventually be a method of the class it is # defined on. If 'obj' is a class, the 'name' is required to be the name diff --git a/django/utils/numberformat.py b/django/utils/numberformat.py index a1ecd1bd0d..2b5a138ed5 100644 --- a/django/utils/numberformat.py +++ b/django/utils/numberformat.py @@ -41,7 +41,6 @@ def format( if isinstance(number, float) and "e" in str(number).lower(): number = Decimal(str(number)) if isinstance(number, Decimal): - if decimal_pos is not None: # If the provided number is too small to affect any of the visible # decimal places, consider it equal to '0'. |
