Skip to content

Commit 5732a86

Browse files
radarherehugovk
andauthored
Use snake case
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 646b4a4 commit 5732a86

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/PIL/MpoImagePlugin.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
4646

4747
mpf_offset = 28
4848
offsets: list[int] = []
49-
total = 0
50-
imSequences = [im] + list(append_images)
51-
for imSequence in imSequences:
52-
total += getattr(imSequence, "n_frames", 1)
53-
for imSequence in imSequences:
54-
for im_frame in ImageSequence.Iterator(imSequence):
49+
im_sequences = [im, *append_images]
50+
total = sum(getattr(seq, "n_frames", 1) for seq in im_sequences)
51+
for im_sequence in im_sequences:
52+
for im_frame in ImageSequence.Iterator(im_sequence):
5553
if not offsets:
5654
# APP2 marker
5755
ifd_length = 66 + 16 * total

0 commit comments

Comments
 (0)