Skip to content

Commit

Permalink
Use f-string
Browse files Browse the repository at this point in the history
Co-authored-by: Aarni Koskela <akx@iki.fi>
  • Loading branch information
radarhere and akx committed Dec 1, 2023
1 parent f1fef09 commit 30eb414
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/PIL/DdsImagePlugin.py
Expand Up @@ -154,9 +154,7 @@ def _open(self):
self._mode = "RGB"
mask_count = 3

masks = struct.unpack(
"<" + str(mask_count) + "I", header.read(mask_count * 4)
)
masks = struct.unpack(f"<{mask_count}I", header.read(mask_count * 4))
self.tile = [("dds_rgb", (0, 0) + self.size, 0, (bitcount, masks))]
elif pfflags & DDPF_PALETTEINDEXED8:
self._mode = "P"
Expand Down

0 comments on commit 30eb414

Please sign in to comment.