diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index 6c4d77b19e3..cce70880a04 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -25,7 +25,7 @@ import os import sys from . import Image, ImageFile -from ._binary import i32le as i32, o32le as o32 +from ._binary import i32le as i32 __version__ = "0.5" diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py index 7fe662fc6d1..a0d38f7d6be 100644 --- a/PIL/GifImagePlugin.py +++ b/PIL/GifImagePlugin.py @@ -508,7 +508,6 @@ def _save_netpbm(im, fp, filename): import os from subprocess import Popen, check_call, PIPE, CalledProcessError - import tempfile file = im._dump() with open(filename, 'wb') as f: diff --git a/PIL/JpegImagePlugin.py b/PIL/JpegImagePlugin.py index f01885b6093..7a29d8bffe4 100644 --- a/PIL/JpegImagePlugin.py +++ b/PIL/JpegImagePlugin.py @@ -39,7 +39,7 @@ import io import warnings from . import Image, ImageFile, TiffImagePlugin -from ._binary import i8, o8, i16be as i16, i32be as i32 +from ._binary import i8, o8, i16be as i16 from .JpegPresets import presets from ._util import isStringType diff --git a/PIL/PngImagePlugin.py b/PIL/PngImagePlugin.py index defbe54afd5..5e5eb14c735 100644 --- a/PIL/PngImagePlugin.py +++ b/PIL/PngImagePlugin.py @@ -37,7 +37,7 @@ import struct from . import Image, ImageFile, ImagePalette -from ._binary import i8, i16be as i16, i32be as i32, o8, o16be as o16, o32be as o32 +from ._binary import i8, i16be as i16, i32be as i32, o16be as o16, o32be as o32 __version__ = "0.9" diff --git a/PIL/TgaImagePlugin.py b/PIL/TgaImagePlugin.py index de2844339d7..0bc52529a54 100644 --- a/PIL/TgaImagePlugin.py +++ b/PIL/TgaImagePlugin.py @@ -18,7 +18,7 @@ from . import Image, ImageFile, ImagePalette -from ._binary import i8, i16le as i16, o8, o16le as o16, o32le as o32 +from ._binary import i8, i16le as i16, o8, o16le as o16 __version__ = "0.3" diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index b703598c53b..f90a29162f9 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, hopper, py3 +from helper import unittest, PillowTestCase, hopper from helper import djpeg_available, cjpeg_available from io import BytesIO @@ -32,11 +32,11 @@ def gen_random_image(self, size, mode='RGB'): """ Generates a very hard to compress file :param size: tuple :param mode: optional image mode - + """ return Image.frombytes(mode, size, os.urandom(size[0]*size[1]*len(mode))) - + def test_sanity(self): # internal version number @@ -176,7 +176,7 @@ def test_progressive_cmyk_buffer(self): f = BytesIO() im = self.gen_random_image((256,256), 'CMYK') im.save(f, format='JPEG', progressive=True, quality=94) - + def test_large_exif(self): # https://github.com/python-pillow/Pillow/issues/148 f = self.tempfile('temp.jpg') diff --git a/Tests/test_file_wmf.py b/Tests/test_file_wmf.py index 9f2f893cbea..2da74cc13b0 100644 --- a/Tests/test_file_wmf.py +++ b/Tests/test_file_wmf.py @@ -1,6 +1,5 @@ from helper import unittest, PillowTestCase from PIL import Image -from io import BytesIO class TestFileWmf(PillowTestCase):