Merge pull request #2100 from radarhere/flake8

Flake8 and whitespace fixes
This commit is contained in:
Hugo 2016-09-03 12:41:06 +03:00 committed by GitHub
commit 6009e867e8
41 changed files with 178 additions and 176 deletions

View File

@ -32,6 +32,7 @@ for r in range(8):
for b in range(4):
PALETTE = PALETTE + (o8((r*255)//7)+o8((g*255)//7)+o8((b*255)//3))
def _accept(prefix):
return prefix[:6] == _MAGIC

View File

@ -71,7 +71,6 @@ class TestFileEps(PillowTestCase):
target = Image.open('Tests/images/pil_sample_rgb.jpg')
self.assert_image_similar(cmyk_image, target, 10)
def test_file_object(self):
# issue 479
image1 = Image.open(file1)

View File

@ -264,6 +264,7 @@ class TestImageCms(PillowTestCase):
# Helper function to reduce precision of tuples of floats
# recursively and then check equality.
power = 10 ** digits
def truncate_tuple(tuple_or_float):
return tuple(
truncate_tuple(val) if isinstance(val, tuple)

View File

@ -22,6 +22,7 @@ TEST_IMAGE_SIZE = (10, 10)
SKIP_NUMPY_ON_PYPY = hasattr(sys, 'pypy_version_info') and (
sys.pypy_version_info <= (5, 3, 1, 'final', 0))
class TestNumpy(PillowTestCase):
def setUp(self):