Skip to content

Commit

Permalink
Bump black from 23.12.1 to 24.1.1 (#151)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dependabot[bot] and codingjoe authored Feb 9, 2024
1 parent 4c094eb commit 8272001
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion linter-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bandit==1.7.7
black==23.12.1
black==24.1.1
flake8==7.0.0
isort==5.13.2
pydocstyle[toml]==6.3.0
8 changes: 5 additions & 3 deletions pictures/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ def url(self) -> str:
kwargs={
"alt": Path(self.parent_name).stem,
"width": self.width,
"ratio": f"{self.aspect_ratio.numerator}x{self.aspect_ratio.denominator}"
if self.aspect_ratio
else None,
"ratio": (
f"{self.aspect_ratio.numerator}x{self.aspect_ratio.denominator}"
if self.aspect_ratio
else None
),
"file_type": self.file_type,
},
)
Expand Down
6 changes: 5 additions & 1 deletion pictures/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ def _media_query(*, container_width: int = None, **breakpoints: {str: int}):
prev_width = width
prev_ratio = ratio
if prev_ratio:
yield f"{math.floor(prev_ratio * container_width)}px" if container_width else f"{math.floor(prev_ratio * 100)}vw"
yield (
f"{math.floor(prev_ratio * container_width)}px"
if container_width
else f"{math.floor(prev_ratio * 100)}vw"
)
else:
warnings.warn(
"Your container is smaller than all your breakpoints.", UserWarning
Expand Down
1 change: 1 addition & 0 deletions tests/testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""

import os
from pathlib import Path

Expand Down

0 comments on commit 8272001

Please sign in to comment.