mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
linter fixes
This commit is contained in:
parent
fd21de7dc4
commit
e234445682
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user