Skip to content

Commit

Permalink
Except some code from Ruff 0.3.x f-string rule
Browse files Browse the repository at this point in the history
In some cases, applying Ruff's UP032 rule makes code less readable.
  • Loading branch information
justinmayer committed Mar 12, 2024
1 parent 1d88ef7 commit eb00b04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pelican/plugins/photos/photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ def enqueue_image(img: Image) -> Image:
or g_image_cache[img.dst].spec != img.spec
):
raise InternalError(
"resize conflict for {}, {}-{} is not {}-{}".format(
"Resize conflict for {}, {}-{} is not {}-{}".format( # noqa: UP032
img.dst,
g_image_cache[img.dst].source_image.filename,
g_image_cache[img.dst].spec,
Expand Down Expand Up @@ -2169,7 +2169,7 @@ def replace_inline_images(content, inline_images):
html_img_attributes = profile.thumb_html_img_attributes
if html_img_attributes:
for prof_attr_name, prof_attr_value in html_img_attributes.items():
extra_attributes += ' {}="{}"'.format(
extra_attributes += ' {}="{}"'.format( # noqa: UP032
prof_attr_name, prof_attr_value.format(i=image)
)

Expand Down

0 comments on commit eb00b04

Please sign in to comment.