Ignore that which mypy gets wrong

This commit is contained in:
Eric Soroos 2018-01-04 14:18:07 +00:00
parent 6e45d8d577
commit 1f1b90f513

View File

@ -1469,10 +1469,10 @@ class Image(object):
raise ValueError("Incorrect Paste specification") raise ValueError("Incorrect Paste specification")
if len(box) == 4: if len(box) == 4:
box_lurd = box box_lurd = box # type: ignore
elif len(box) == 2: elif len(box) == 2:
# upper left corner given; get size from image or mask # upper left corner given; get size from image or mask
box_coord = box box_coord = box # type: ignore
if paste_im: if paste_im:
size = paste_im.size size = paste_im.size
elif mask_img: elif mask_img:
@ -1482,7 +1482,7 @@ class Image(object):
raise ValueError( raise ValueError(
"cannot determine region size; use 4-item box" "cannot determine region size; use 4-item box"
) )
box_lurd = box_coord + (box_coord[0]+size[0], box_coord[1]+size[1]) box_lurd = box_coord + (box_coord[0]+size[0], box_coord[1]+size[1]) # type: ignore
else: else:
raise ValueError("Incorrect Box specification") raise ValueError("Incorrect Box specification")