Flake8 fixes

This commit is contained in:
Andrew Murray 2015-12-10 09:35:35 +11:00
parent 1c99b39239
commit c27110ab56
11 changed files with 26 additions and 27 deletions

View File

@ -42,6 +42,7 @@ from PIL._util import isStringType
# Application code should use the <b>Draw</b> factory, instead of # Application code should use the <b>Draw</b> factory, instead of
# directly. # directly.
class ImageDraw(object): class ImageDraw(object):
## ##

View File

@ -85,6 +85,7 @@ def fromqpixmap(im):
# bytes_io.seek(0) # bytes_io.seek(0)
# return Image.open(bytes_io) # return Image.open(bytes_io)
def align8to32(bytes, width, mode): def align8to32(bytes, width, mode):
""" """
converts each scanline of data from 8 bit to 32 bit aligned converts each scanline of data from 8 bit to 32 bit aligned
@ -113,6 +114,7 @@ def align8to32(bytes, width, mode):
return b''.join(new_data) return b''.join(new_data)
def _toqclass_helper(im): def _toqclass_helper(im):
data = None data = None
colortable = None colortable = None

View File

@ -70,7 +70,6 @@ class TestFileTiffMetadata(PillowTestCase):
loaded_double = loaded.tag[tag_ids['YawAngle']][0] loaded_double = loaded.tag[tag_ids['YawAngle']][0]
self.assertAlmostEqual(loaded_double, doubledata) self.assertAlmostEqual(loaded_double, doubledata)
def test_read_metadata(self): def test_read_metadata(self):
img = Image.open('Tests/images/hopper_g4.tif') img = Image.open('Tests/images/hopper_g4.tif')
@ -167,7 +166,6 @@ class TestFileTiffMetadata(PillowTestCase):
self.assert_(im.info['icc_profile']) self.assert_(im.info['icc_profile'])
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()

View File

@ -60,7 +60,6 @@ if sys.platform.startswith('win32'):
CreateDIBSection.argtypes = [ctypes.wintypes.HDC, ctypes.c_void_p, ctypes.c_uint, ctypes.POINTER(ctypes.c_void_p), ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD] CreateDIBSection.argtypes = [ctypes.wintypes.HDC, ctypes.c_void_p, ctypes.c_uint, ctypes.POINTER(ctypes.c_void_p), ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD]
CreateDIBSection.restype = ctypes.wintypes.HBITMAP CreateDIBSection.restype = ctypes.wintypes.HBITMAP
def serialize_dib(bi, pixels): def serialize_dib(bi, pixels):
bf = BITMAPFILEHEADER() bf = BITMAPFILEHEADER()
bf.bfType = 0x4d42 bf.bfType = 0x4d42
@ -108,4 +107,3 @@ if sys.platform.startswith('win32'):
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()