Fix linting

This commit is contained in:
Hugo van Kemenade 2022-10-28 18:03:38 +03:00
parent 00b25fd3ac
commit 799a6a0105
2 changed files with 4 additions and 3 deletions

View File

@ -868,11 +868,10 @@ class TestFileTiff:
def test_oom(self, test_file):
with pytest.raises(UnidentifiedImageError):
with pytest.warns(UserWarning):
with Image.open(test_file) as im:
with Image.open(test_file):
pass
@pytest.mark.skipif(not is_win32(), reason="Windows only")
class TestFileTiffW32:
def test_fd_leak(self, tmp_path):

View File

@ -1401,7 +1401,9 @@ class TiffImageFile(ImageFile.ImageFile):
if samples_per_pixel > MAX_SAMPLESPERPIXEL:
# DOS check, samples_per_pixel can be a Long, and we extend the tuple below
logger.error("More samples per pixel than can be decoded: %s", samples_per_pixel)
logger.error(
"More samples per pixel than can be decoded: %s", samples_per_pixel
)
raise SyntaxError("Invalid value for samples per pixel")
if samples_per_pixel < bps_actual_count: