Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump black from 23.12.1 to 24.1.1 #151

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading