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/forms/widgets.py | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'django/forms/widgets.py')
| -rw-r--r-- | django/forms/widgets.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 2c734052d5..4fae110d5e 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -101,9 +101,11 @@ class Media: def render_js(self): return [ - path.__html__() - if hasattr(path, "__html__") - else format_html('<script src="{}"></script>', self.absolute_path(path)) + ( + path.__html__() + if hasattr(path, "__html__") + else format_html('<script src="{}"></script>', self.absolute_path(path)) + ) for path in self._js ] @@ -113,12 +115,14 @@ class Media: media = sorted(self._css) return chain.from_iterable( [ - path.__html__() - if hasattr(path, "__html__") - else format_html( - '<link href="{}" media="{}" rel="stylesheet">', - self.absolute_path(path), - medium, + ( + path.__html__() + if hasattr(path, "__html__") + else format_html( + '<link href="{}" media="{}" rel="stylesheet">', + self.absolute_path(path), + medium, + ) ) for path in self._css[medium] ] |
