Don't redeclare loop variable

This commit is contained in:
Hugo van Kemenade 2022-04-10 19:52:38 +03:00
parent b863da6deb
commit 9d87b26a67
2 changed files with 8 additions and 8 deletions

View File

@ -27,15 +27,15 @@ def test_sanity():
"HSV",
)
for mode in modes:
im = hopper(mode)
for mode in modes:
convert(im, mode)
for input_mode in modes:
im = hopper(input_mode)
for output_mode in modes:
convert(im, output_mode)
# Check 0
im = Image.new(mode, (0, 0))
for mode in modes:
convert(im, mode)
im = Image.new(input_mode, (0, 0))
for output_mode in modes:
convert(im, output_mode)
def test_default():

View File

@ -64,7 +64,7 @@ class XpmImageFile(ImageFile.ImageFile):
palette = [b"\0\0\0"] * 256
for i in range(pal):
for _ in range(pal):
s = self.fp.readline()
if s[-2:] == b"\r\n":