diff --git a/PIL/ArgImagePlugin.py b/PIL/ArgImagePlugin.py index df5ff2625..7fc167c60 100644 --- a/PIL/ArgImagePlugin.py +++ b/PIL/ArgImagePlugin.py @@ -370,7 +370,7 @@ class ArgStream(ChunkStream): im1 = im1.chop_add_modulo(im0.crop(bbox)) im0.paste(im1, bbox) - self.count = self.count - 1 + self.count -= 1 if self.count == 0 and self.show: self.im = self.images[self.id] diff --git a/PIL/BdfFontFile.py b/PIL/BdfFontFile.py index 3be80d602..3a41848d8 100644 --- a/PIL/BdfFontFile.py +++ b/PIL/BdfFontFile.py @@ -128,5 +128,5 @@ class BdfFontFile(FontFile.FontFile): if not c: break id, ch, (xy, dst, src), im = c - if ch >= 0 and ch < len(self.glyph): + if 0 <= ch < len(self.glyph): self.glyph[ch] = xy, dst, src, im diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index 1df5b5d61..9f963f7e6 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -104,7 +104,7 @@ def Ghostscript(tile, size, fp, scale=1): s = fp.read(min(lengthfile, 100*1024)) if not s: break - lengthfile = lengthfile - len(s) + length -= len(s) f.write(s) # Build ghostscript command @@ -161,7 +161,7 @@ class PSFile: def tell(self): pos = self.fp.tell() if self.char: - pos = pos - 1 + pos -= 1 return pos def readline(self): s = b"" diff --git a/PIL/ExifTags.py b/PIL/ExifTags.py index 16473f930..25cd08068 100644 --- a/PIL/ExifTags.py +++ b/PIL/ExifTags.py @@ -63,15 +63,12 @@ TAGS = { 0x0201: "JpegIFOffset", 0x0202: "JpegIFByteCount", 0x0211: "YCbCrCoefficients", - 0x0211: "YCbCrCoefficients", 0x0212: "YCbCrSubSampling", 0x0213: "YCbCrPositioning", - 0x0213: "YCbCrPositioning", - 0x0214: "ReferenceBlackWhite", 0x0214: "ReferenceBlackWhite", 0x1000: "RelatedImageFileFormat", - 0x1001: "RelatedImageLength", - 0x1001: "RelatedImageWidth", + 0x1001: "RelatedImageLength", # FIXME / Dictionary contains duplicate keys + 0x1001: "RelatedImageWidth", # FIXME \ Dictionary contains duplicate keys 0x828d: "CFARepeatPatternDim", 0x828e: "CFAPattern", 0x828f: "BatteryLevel", diff --git a/PIL/FliImagePlugin.py b/PIL/FliImagePlugin.py index bef9b722e..c9a29051e 100644 --- a/PIL/FliImagePlugin.py +++ b/PIL/FliImagePlugin.py @@ -105,7 +105,7 @@ class FliImageFile(ImageFile.ImageFile): g = i8(s[n+1]) << shift b = i8(s[n+2]) << shift palette[i] = (r, g, b) - i = i + 1 + i += 1 def seek(self, frame): diff --git a/PIL/FontFile.py b/PIL/FontFile.py index 4dce0a292..7c5704c9d 100644 --- a/PIL/FontFile.py +++ b/PIL/FontFile.py @@ -30,7 +30,7 @@ def puti16(fp, values): # write network order (big-endian) 16-bit sequence for v in values: if v < 0: - v = v + 65536 + v += 65536 fp.write(_binary.o16be(v)) ## @@ -63,7 +63,7 @@ class FontFile: h = max(h, src[3] - src[1]) w = w + (src[2] - src[0]) if w > WIDTH: - lines = lines + 1 + lines += 1 w = (src[2] - src[0]) maxwidth = max(maxwidth, w) diff --git a/PIL/FpxImagePlugin.py b/PIL/FpxImagePlugin.py index b712557d7..64c7b1568 100644 --- a/PIL/FpxImagePlugin.py +++ b/PIL/FpxImagePlugin.py @@ -84,7 +84,7 @@ class FpxImageFile(ImageFile.ImageFile): i = 1 while size > 64: size = size / 2 - i = i + 1 + i += 1 self.maxid = i - 1 # mode. instead of using a single field for this, flashpix diff --git a/PIL/GimpGradientFile.py b/PIL/GimpGradientFile.py index 4ae727773..7c88addae 100644 --- a/PIL/GimpGradientFile.py +++ b/PIL/GimpGradientFile.py @@ -68,7 +68,7 @@ class GradientFile: x = i / float(entries-1) while x1 < x: - ix = ix + 1 + ix += 1 x0, x1, xm, rgb0, rgb1, segment = self.gradient[ix] w = x1 - x0 diff --git a/PIL/GimpPaletteFile.py b/PIL/GimpPaletteFile.py index c271b964f..6f71ec678 100644 --- a/PIL/GimpPaletteFile.py +++ b/PIL/GimpPaletteFile.py @@ -52,7 +52,7 @@ class GimpPaletteFile: if 0 <= i <= 255: self.palette[i] = o8(v[0]) + o8(v[1]) + o8(v[2]) - i = i + 1 + i += 1 self.palette = b"".join(self.palette) diff --git a/PIL/IcnsImagePlugin.py b/PIL/IcnsImagePlugin.py index 9a0864bad..6951c9325 100644 --- a/PIL/IcnsImagePlugin.py +++ b/PIL/IcnsImagePlugin.py @@ -70,7 +70,7 @@ def read_32(fobj, start_length, size): else: blocksize = byte + 1 data.append(fobj.read(blocksize)) - bytesleft = bytesleft - blocksize + bytesleft -= blocksize if bytesleft <= 0: break if bytesleft != 0: @@ -179,11 +179,11 @@ class IcnsFile: i = HEADERSIZE while i < filesize: sig, blocksize = nextheader(fobj) - i = i + HEADERSIZE - blocksize = blocksize - HEADERSIZE + i += HEADERSIZE + blocksize -= HEADERSIZE dct[sig] = (i, blocksize) fobj.seek(blocksize, 1) - i = i + blocksize + i += blocksize def itersizes(self): sizes = [] diff --git a/PIL/ImImagePlugin.py b/PIL/ImImagePlugin.py index 1f8f011dc..a5eeef76a 100644 --- a/PIL/ImImagePlugin.py +++ b/PIL/ImImagePlugin.py @@ -182,7 +182,7 @@ class ImImageFile(ImageFile.ImageFile): self.info[k] = v if k in TAGS: - n = n + 1 + n += 1 else: diff --git a/PIL/Image.py b/PIL/Image.py index b0b90a20b..0d97e9dc7 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -455,7 +455,7 @@ def _getscaleoffset(expr): (a, b, c) = data # simplified syntax if (a is stub and b == "__mul__" and isinstance(c, numbers.Number)): return c, 0.0 - if (a is stub and b == "__add__" and isinstance(c, numbers.Number)): + if a is stub and b == "__add__" and isinstance(c, numbers.Number): return 1.0, c except TypeError: pass @@ -2081,7 +2081,6 @@ def frombuffer(mode, size, data, decoder_name="raw", *args): .. versionadded:: 1.1.4 """ - "Load image from bytes or buffer" # may pass tuple instead of argument list if len(args) == 1 and isinstance(args[0], tuple): diff --git a/PIL/ImageFile.py b/PIL/ImageFile.py index 501e16b00..adb27f2bd 100644 --- a/PIL/ImageFile.py +++ b/PIL/ImageFile.py @@ -502,5 +502,5 @@ def _safe_read(fp, size): if not block: break data.append(block) - size = size - len(block) + size -= len(block) return b"".join(data) diff --git a/PIL/ImageMath.py b/PIL/ImageMath.py index b2355ed1d..adfcc4f6f 100644 --- a/PIL/ImageMath.py +++ b/PIL/ImageMath.py @@ -17,7 +17,6 @@ from PIL import Image from PIL import _imagingmath -import sys try: import builtins diff --git a/PIL/ImageOps.py b/PIL/ImageOps.py index 0d22f8c64..64c35cca1 100644 --- a/PIL/ImageOps.py +++ b/PIL/ImageOps.py @@ -94,7 +94,7 @@ def autocontrast(image, cutoff=0, ignore=None): cut = cut - h[lo] h[lo] = 0 else: - h[lo] = h[lo] - cut + h[lo] -= cut cut = 0 if cut <= 0: break @@ -105,7 +105,7 @@ def autocontrast(image, cutoff=0, ignore=None): cut = cut - h[hi] h[hi] = 0 else: - h[hi] = h[hi] - cut + h[hi] -= cut cut = 0 if cut <= 0: break diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py index e81866bac..40fe629d9 100644 --- a/PIL/ImageShow.py +++ b/PIL/ImageShow.py @@ -17,7 +17,7 @@ from __future__ import print_function from PIL import Image import os, sys -if(sys.version_info >= (3, 3)): +if sys.version_info >= (3, 3): from shlex import quote else: from pipes import quote @@ -160,7 +160,7 @@ else: # imagemagick's display command instead. command = executable = "xv" if title: - command = command + " -name %s" % quote(title) + command += " -name %s" % quote(title) return command, executable if which("xv"): diff --git a/PIL/ImageStat.py b/PIL/ImageStat.py index ef63b7857..d84e2cbf1 100644 --- a/PIL/ImageStat.py +++ b/PIL/ImageStat.py @@ -21,7 +21,6 @@ # See the README file for information on usage and redistribution. # -from PIL import Image import operator, math from functools import reduce @@ -81,7 +80,7 @@ class Stat: for i in range(0, len(self.h), 256): sum = 0.0 for j in range(256): - sum = sum + j * self.h[i+j] + sum += j * self.h[i + j] v.append(sum) return v @@ -92,7 +91,7 @@ class Stat: for i in range(0, len(self.h), 256): sum2 = 0.0 for j in range(256): - sum2 = sum2 + (j ** 2) * float(self.h[i+j]) + sum2 += (j ** 2) * float(self.h[i + j]) v.append(sum2) return v diff --git a/PIL/IptcImagePlugin.py b/PIL/IptcImagePlugin.py index 104153002..85575612c 100644 --- a/PIL/IptcImagePlugin.py +++ b/PIL/IptcImagePlugin.py @@ -103,7 +103,7 @@ class IptcImageFile(ImageFile.ImageFile): break if s != sz: return 0 - y = y + 1 + y += 1 return y == size[1] def _open(self): @@ -187,7 +187,7 @@ class IptcImageFile(ImageFile.ImageFile): if not s: break o.write(s) - size = size - len(s) + size -= len(s) o.close() try: @@ -235,26 +235,26 @@ def getiptcinfo(im): # parse the image resource block offset = 0 while app[offset:offset+4] == "8BIM": - offset = offset + 4 + offset += 4 # resource code code = JpegImagePlugin.i16(app, offset) - offset = offset + 2 + offset += 2 # resource name (usually empty) name_len = i8(app[offset]) name = app[offset+1:offset+1+name_len] offset = 1 + offset + name_len if offset & 1: - offset = offset + 1 + offset += 1 # resource data block size = JpegImagePlugin.i32(app, offset) - offset = offset + 4 + offset += 4 if code == 0x0404: # 0x0404 contains IPTC/NAA data data = app[offset:offset+size] break offset = offset + size if offset & 1: - offset = offset + 1 + offset += 1 except (AttributeError, KeyError): pass diff --git a/PIL/Jpeg2KImagePlugin.py b/PIL/Jpeg2KImagePlugin.py index f42adde99..c4c980f6e 100644 --- a/PIL/Jpeg2KImagePlugin.py +++ b/PIL/Jpeg2KImagePlugin.py @@ -46,7 +46,7 @@ def _parse_codestream(fp): elif csiz == 3: mode = 'RGB' elif csiz == 4: - mode == 'RGBA' + mode = 'RGBA' else: mode = None @@ -124,7 +124,7 @@ def _parse_jp2_header(fp): if nc == 3: mode = 'RGB' elif nc == 4: - mode == 'RGBA' + mode = 'RGBA' break return (size, mode) diff --git a/PIL/JpegImagePlugin.py b/PIL/JpegImagePlugin.py index 7b40d5d4f..aaef663a7 100644 --- a/PIL/JpegImagePlugin.py +++ b/PIL/JpegImagePlugin.py @@ -561,8 +561,8 @@ def _save(im, fp, filename): i = 1 for marker in markers: size = struct.pack(">H", 2 + ICC_OVERHEAD_LEN + len(marker)) - extra = extra + (b"\xFF\xE2" + size + b"ICC_PROFILE\0" + o8(i) + o8(len(markers)) + marker) - i = i + 1 + extra += b"\xFF\xE2" + size + b"ICC_PROFILE\0" + o8(i) + o8(len(markers)) + marker + i += 1 # get keyword arguments im.encoderconfig = ( diff --git a/PIL/MpegImagePlugin.py b/PIL/MpegImagePlugin.py index 9d7a0ea7a..02e6adc00 100644 --- a/PIL/MpegImagePlugin.py +++ b/PIL/MpegImagePlugin.py @@ -38,13 +38,13 @@ class BitStream: self.bits = 0 continue self.bitbuffer = (self.bitbuffer << 8) + c - self.bits = self.bits + 8 + self.bits += 8 return self.bitbuffer >> (self.bits - bits) & (1 << bits) - 1 def skip(self, bits): while self.bits < bits: self.bitbuffer = (self.bitbuffer << 8) + i8(self.fp.read(1)) - self.bits = self.bits + 8 + self.bits += 8 self.bits = self.bits - bits def read(self, bits): diff --git a/PIL/PalmImagePlugin.py b/PIL/PalmImagePlugin.py index 89f42bffc..203a6d9f6 100644 --- a/PIL/PalmImagePlugin.py +++ b/PIL/PalmImagePlugin.py @@ -172,21 +172,21 @@ def _save(im, fp, filename, check=0): cols = im.size[0] rows = im.size[1] - rowbytes = ((cols + (16//bpp - 1)) / (16 // bpp)) * 2; + rowbytes = ((cols + (16//bpp - 1)) / (16 // bpp)) * 2 transparent_index = 0 compression_type = _COMPRESSION_TYPES["none"] - flags = 0; + flags = 0 if im.mode == "P" and "custom-colormap" in im.info: flags = flags & _FLAGS["custom-colormap"] - colormapsize = 4 * 256 + 2; + colormapsize = 4 * 256 + 2 colormapmode = im.palette.mode colormap = im.getdata().getpalette() else: colormapsize = 0 if "offset" in im.info: - offset = (rowbytes * rows + 16 + 3 + colormapsize) // 4; + offset = (rowbytes * rows + 16 + 3 + colormapsize) // 4 else: offset = 0 diff --git a/PIL/PcxImagePlugin.py b/PIL/PcxImagePlugin.py index 2496af676..4f6d5a3e5 100644 --- a/PIL/PcxImagePlugin.py +++ b/PIL/PcxImagePlugin.py @@ -135,7 +135,7 @@ def _save(im, fp, filename, check=0): # bytes per plane stride = (im.size[0] * bits + 7) // 8 # stride should be even - stride = stride + (stride % 2) + stride += stride % 2 # Stride needs to be kept in sync with the PcxEncode.c version. # Ideally it should be passed in in the state, but the bytes value # gets overwritten. diff --git a/PIL/PdfImagePlugin.py b/PIL/PdfImagePlugin.py index fcc841438..5113f099e 100644 --- a/PIL/PdfImagePlugin.py +++ b/PIL/PdfImagePlugin.py @@ -108,8 +108,8 @@ def _save(im, fp, filename): r = i8(palette[i*3]) g = i8(palette[i*3+1]) b = i8(palette[i*3+2]) - colorspace = colorspace + "%02x%02x%02x " % (r, g, b) - colorspace = colorspace + "> ]" + colorspace += "%02x%02x%02x " % (r, g, b) + colorspace += "> ]" procset = "/ImageI" # indexed color elif im.mode == "RGB": filter = "/DCTDecode" diff --git a/PIL/PsdImagePlugin.py b/PIL/PsdImagePlugin.py index f6aefe9c9..9e64e7c90 100644 --- a/PIL/PsdImagePlugin.py +++ b/PIL/PsdImagePlugin.py @@ -235,7 +235,7 @@ def _layerinfo(file): if t: tile.extend(t) layers[i] = name, mode, bbox, tile - i = i + 1 + i += 1 return layers @@ -258,7 +258,7 @@ def _maketile(file, mode, bbox, channels): for channel in range(channels): layer = mode[channel] if mode == "CMYK": - layer = layer + ";I" + layer += ";I" tile.append(("raw", bbox, offset, layer)) offset = offset + xsize*ysize @@ -272,13 +272,13 @@ def _maketile(file, mode, bbox, channels): for channel in range(channels): layer = mode[channel] if mode == "CMYK": - layer = layer + ";I" + layer += ";I" tile.append( ("packbits", bbox, offset, layer) ) for y in range(ysize): offset = offset + i16(bytecount[i:i+2]) - i = i + 2 + i += 2 file.seek(offset) diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index 34cb020aa..2e49931f7 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -558,9 +558,9 @@ class ImageFileDirectory(collections.MutableMapping): count = count // 2 # adjust for rational data field append((tag, typ, count, o32(offset), data)) - offset = offset + len(data) + offset += len(data) if offset & 1: - offset = offset + 1 # word padding + offset += 1 # word padding # update strip offset data to point beyond auxiliary data if stripoffsets is not None: @@ -644,7 +644,7 @@ class TiffImageFile(ImageFile.ImageFile): self.fp.seek(self.__next) self.tag.load(self.fp) self.__next = self.tag.next - self.__frame = self.__frame + 1 + self.__frame += 1 self._setup() def _tell(self): @@ -900,7 +900,7 @@ class TiffImageFile(ImageFile.ImageFile): y = y + h if y >= self.size[1]: x = y = 0 - l = l + 1 + l += 1 a = None elif TILEOFFSETS in self.tag: # tiled image @@ -921,7 +921,7 @@ class TiffImageFile(ImageFile.ImageFile): x, y = 0, y + h if y >= self.size[1]: x = y = 0 - l = l + 1 + l += 1 a = None else: if Image.DEBUG: @@ -1089,7 +1089,7 @@ def _save(im, fp, filename): fp.seek(0) _fp = os.dup(fp.fileno()) - blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS, ROWSPERSTRIP, ICCPROFILE] # ICC Profile crashes. + blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS, ROWSPERSTRIP, ICCPROFILE] # ICC Profile crashes. atts={} # bits per sample is a single short in the tiff directory, not a list. atts[BITSPERSAMPLE] = bits[0] diff --git a/PIL/TiffTags.py b/PIL/TiffTags.py index 9d4530051..92a4b5afc 100644 --- a/PIL/TiffTags.py +++ b/PIL/TiffTags.py @@ -161,7 +161,7 @@ TAGS = { 50716: "BlackLevelDeltaV", 50717: "WhiteLevel", 50718: "DefaultScale", - 50741: "BestQualityScale", + 50741: "BestQualityScale", # FIXME! Dictionary contains duplicate keys 50741 50719: "DefaultCropOrigin", 50720: "DefaultCropSize", 50778: "CalibrationIlluminant1", @@ -185,7 +185,7 @@ TAGS = { 50737: "ChromaBlurRadius", 50738: "AntiAliasStrength", 50740: "DNGPrivateData", - 50741: "MakerNoteSafety", + 50741: "MakerNoteSafety", # FIXME! Dictionary contains duplicate keys 50741 #ImageJ 50838: "ImageJMetaDataByteCounts", # private tag registered with Adobe diff --git a/PIL/WmfImagePlugin.py b/PIL/WmfImagePlugin.py index 9a95a0713..40b2037ab 100644 --- a/PIL/WmfImagePlugin.py +++ b/PIL/WmfImagePlugin.py @@ -59,7 +59,7 @@ word = _binary.i16le def short(c, o=0): v = word(c, o) if v >= 32768: - v = v - 65536 + v -= 65536 return v dword = _binary.i32le diff --git a/Scripts/explode.py b/Scripts/explode.py index 90084a464..b8680f631 100644 --- a/Scripts/explode.py +++ b/Scripts/explode.py @@ -104,7 +104,7 @@ while True: except EOFError: break - ix = ix + 1 + ix += 1 if html: html.write("\n\n") diff --git a/Scripts/gifmaker.py b/Scripts/gifmaker.py index 9964f77b1..9fa5e71a4 100644 --- a/Scripts/gifmaker.py +++ b/Scripts/gifmaker.py @@ -100,7 +100,7 @@ def makedelta(fp, sequence): previous = im.copy() - frames = frames + 1 + frames += 1 fp.write(";") diff --git a/Scripts/pildriver.py b/Scripts/pildriver.py index 98708c897..e45b05008 100644 --- a/Scripts/pildriver.py +++ b/Scripts/pildriver.py @@ -486,7 +486,7 @@ class PILDriver: print("Stack: " + repr(self.stack)) top = self.top() if not isinstance(top, str): - continue; + continue funcname = "do_" + top if not hasattr(self, funcname): continue @@ -513,9 +513,9 @@ if __name__ == '__main__': while True: try: if sys.version_info[0] >= 3: - line = input('pildriver> '); + line = input('pildriver> ') else: - line = raw_input('pildriver> '); + line = raw_input('pildriver> ') except EOFError: print("\nPILDriver says goodbye.") break diff --git a/Scripts/pilfile.py b/Scripts/pilfile.py index 48514e88b..1b77b0e78 100644 --- a/Scripts/pilfile.py +++ b/Scripts/pilfile.py @@ -57,7 +57,7 @@ for o, a in opt: elif o == "-v": verify = 1 elif o == "-D": - Image.DEBUG = Image.DEBUG + 1 + Image.DEBUG += 1 def globfix(files): # expand wildcards where necessary diff --git a/Tests/images/rgb_trns_ycbc.j2k b/Tests/images/rgb_trns_ycbc.j2k new file mode 100644 index 000000000..462729501 Binary files /dev/null and b/Tests/images/rgb_trns_ycbc.j2k differ diff --git a/Tests/images/rgb_trns_ycbc.jp2 b/Tests/images/rgb_trns_ycbc.jp2 new file mode 100644 index 000000000..dea77c6da Binary files /dev/null and b/Tests/images/rgb_trns_ycbc.jp2 differ diff --git a/Tests/run.py b/Tests/run.py index 758923f0f..82e1b94dc 100644 --- a/Tests/run.py +++ b/Tests/run.py @@ -72,7 +72,7 @@ for file in files: if not p.startswith('^'): p = '^' + p if not p.endswith('$'): - p = p + '$' + p += '$' return p ignore_res = [re.compile(fix_re(p), re.MULTILINE) for p in ignore_pats] @@ -104,7 +104,7 @@ for file in files: print(result) failed.append(test) else: - success = success + 1 + success += 1 print("-"*68) diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py index 9111f4f8a..b662124b4 100644 --- a/Tests/test_file_jpeg2k.py +++ b/Tests/test_file_jpeg2k.py @@ -107,6 +107,18 @@ class TestFileJpeg2k(PillowTestCase): im.load() self.assert_image_similar(im, test_card, 0.4) + def test_rgba(self): + # Arrange + j2k = Image.open('Tests/images/rgb_trns_ycbc.j2k') + jp2 = Image.open('Tests/images/rgb_trns_ycbc.jp2') + + # Act + j2k.load() + jp2.load() + + # Assert + self.assertEqual(j2k.mode, 'RGBA') + self.assertEqual(jp2.mode, 'RGBA') if __name__ == '__main__': unittest.main() diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 3f257fef2..b36344416 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -110,8 +110,9 @@ class TestImageTransform(PillowTestCase): # Running by default, but I'd totally understand not doing it in # the future - foo = [Image.new('RGBA', (1024, 1024), (a, a, a, a)) - for a in range(1, 65)] + foo = [ + Image.new('RGBA', (1024, 1024), (a, a, a, a)) + for a in range(1, 65)] # Yeah. Watch some JIT optimize this out. foo = None diff --git a/Tests/test_imagesequence.py b/Tests/test_imagesequence.py index 9001502ac..7f8838207 100644 --- a/Tests/test_imagesequence.py +++ b/Tests/test_imagesequence.py @@ -18,7 +18,7 @@ class TestImageSequence(PillowTestCase): for frame in seq: self.assert_image_equal(im, frame) self.assertEqual(im.tell(), index) - index = index + 1 + index += 1 self.assertEqual(index, 1)