linter fixes

This commit is contained in:
Alexander 2019-11-24 15:22:13 +03:00
parent fd21de7dc4
commit e234445682
3 changed files with 6 additions and 7 deletions

View File

@ -17,7 +17,7 @@ class TestImageDraft(PillowTestCase):
scale, _ = im.decoderconfig
self.assertEqual(box[:2], (0, 0))
self.assertTrue((im.width - scale) < box[2] <= im.width)
self.assertTrue((im.height - scale) < box[3] <= im.height)
self.assertTrue((im.height - scale) < box[3] <= im.height)
return im
def test_size(self):

View File

@ -1,6 +1,6 @@
from PIL import Image
from .helper import PillowTestCase, hopper, fromstring, tostring
from .helper import PillowTestCase, fromstring, hopper, tostring
class TestImageThumbnail(PillowTestCase):
@ -49,9 +49,9 @@ class TestImageThumbnail(PillowTestCase):
self.assert_image(im, im.mode, (64, 64))
def test_DCT_scaling_edges(self):
# Make an image with red borders with size (N * 8) + 1 to cross DCT grid
im = Image.new('RGB', (97, 97), 'red')
im.paste(Image.new('RGB', (95, 95)), (1, 1))
# Make an image with red borders and size (N * 8) + 1 to cross DCT grid
im = Image.new("RGB", (97, 97), "red")
im.paste(Image.new("RGB", (95, 95)), (1, 1))
thumb = fromstring(tostring(im, "JPEG", quality=95))
thumb.thumbnail((24, 24), Image.BICUBIC)

View File

@ -433,8 +433,7 @@ class JpegImageFile(ImageFile.ImageFile):
self.tile = [(d, e, o, a)]
self.decoderconfig = (scale, 0)
box = (0, 0, original_size[0] / float(scale),
original_size[1] / float(scale))
box = (0, 0, original_size[0] / float(scale), original_size[1] / float(scale))
return (self.mode, box)
def load_djpeg(self):