Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
homm committed Nov 24, 2019
1 parent fd21de7 commit c8ac981
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Tests/test_image_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def draft_roundtrip(self, in_mode, in_size, req_mode, req_size):
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):
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_image_thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def test_no_resize(self):
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')
# 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))
Expand Down
3 changes: 1 addition & 2 deletions src/PIL/JpegImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ def draft(self, mode, size):
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):
Expand Down

0 comments on commit c8ac981

Please sign in to comment.