Skip to content

Commit 8272001

Browse files
Bump black from 23.12.1 to 24.1.1 (#151)
* Bump black from 23.12.1 to 24.1.1 Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.1.1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@23.12.1...24.1.1) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Update format --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Johannes Maron <[email protected]>
1 parent 4c094eb commit 8272001

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

linter-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
bandit==1.7.7
2-
black==23.12.1
2+
black==24.1.1
33
flake8==7.0.0
44
isort==5.13.2
55
pydocstyle[toml]==6.3.0

pictures/models.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ def url(self) -> str:
4444
kwargs={
4545
"alt": Path(self.parent_name).stem,
4646
"width": self.width,
47-
"ratio": f"{self.aspect_ratio.numerator}x{self.aspect_ratio.denominator}"
48-
if self.aspect_ratio
49-
else None,
47+
"ratio": (
48+
f"{self.aspect_ratio.numerator}x{self.aspect_ratio.denominator}"
49+
if self.aspect_ratio
50+
else None
51+
),
5052
"file_type": self.file_type,
5153
},
5254
)

pictures/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ def _media_query(*, container_width: int = None, **breakpoints: {str: int}):
4141
prev_width = width
4242
prev_ratio = ratio
4343
if prev_ratio:
44-
yield f"{math.floor(prev_ratio * container_width)}px" if container_width else f"{math.floor(prev_ratio * 100)}vw"
44+
yield (
45+
f"{math.floor(prev_ratio * container_width)}px"
46+
if container_width
47+
else f"{math.floor(prev_ratio * 100)}vw"
48+
)
4549
else:
4650
warnings.warn(
4751
"Your container is smaller than all your breakpoints.", UserWarning

tests/testapp/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
For the full list of settings and their values, see
1010
https://docs.djangoproject.com/en/4.0/ref/settings/
1111
"""
12+
1213
import os
1314
from pathlib import Path
1415

0 commit comments

Comments
 (0)