mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Fix linting
This commit is contained in:
parent
00b25fd3ac
commit
799a6a0105
|
@ -868,11 +868,10 @@ class TestFileTiff:
|
||||||
def test_oom(self, test_file):
|
def test_oom(self, test_file):
|
||||||
with pytest.raises(UnidentifiedImageError):
|
with pytest.raises(UnidentifiedImageError):
|
||||||
with pytest.warns(UserWarning):
|
with pytest.warns(UserWarning):
|
||||||
with Image.open(test_file) as im:
|
with Image.open(test_file):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(not is_win32(), reason="Windows only")
|
@pytest.mark.skipif(not is_win32(), reason="Windows only")
|
||||||
class TestFileTiffW32:
|
class TestFileTiffW32:
|
||||||
def test_fd_leak(self, tmp_path):
|
def test_fd_leak(self, tmp_path):
|
||||||
|
|
|
@ -1401,7 +1401,9 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
|
|
||||||
if samples_per_pixel > MAX_SAMPLESPERPIXEL:
|
if samples_per_pixel > MAX_SAMPLESPERPIXEL:
|
||||||
# DOS check, samples_per_pixel can be a Long, and we extend the tuple below
|
# 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")
|
raise SyntaxError("Invalid value for samples per pixel")
|
||||||
|
|
||||||
if samples_per_pixel < bps_actual_count:
|
if samples_per_pixel < bps_actual_count:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user