Skip to content

Commit 799a6a0

Browse files
committed
Fix linting
1 parent 00b25fd commit 799a6a0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Tests/test_file_tiff.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,10 @@ def test_timeout(self):
868868
def test_oom(self, test_file):
869869
with pytest.raises(UnidentifiedImageError):
870870
with pytest.warns(UserWarning):
871-
with Image.open(test_file) as im:
871+
with Image.open(test_file):
872872
pass
873873

874874

875-
876875
@pytest.mark.skipif(not is_win32(), reason="Windows only")
877876
class TestFileTiffW32:
878877
def test_fd_leak(self, tmp_path):

src/PIL/TiffImagePlugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,9 @@ def _setup(self):
14011401

14021402
if samples_per_pixel > MAX_SAMPLESPERPIXEL:
14031403
# DOS check, samples_per_pixel can be a Long, and we extend the tuple below
1404-
logger.error("More samples per pixel than can be decoded: %s", samples_per_pixel)
1404+
logger.error(
1405+
"More samples per pixel than can be decoded: %s", samples_per_pixel
1406+
)
14051407
raise SyntaxError("Invalid value for samples per pixel")
14061408

14071409
if samples_per_pixel < bps_actual_count:

0 commit comments

Comments
 (0)