Skip to content

Commit eddbdd2

Browse files
committed
Narrow Image type for bit_depth assertions to fix mypy
1 parent a7b2a65 commit eddbdd2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Tests/test_file_png.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def test_interlace(self) -> None:
233233
)
234234
def test_bit_depth(self, test_file: str, expected_bit_depth: int) -> None:
235235
with Image.open(test_file) as im:
236+
assert isinstance(im, PngImagePlugin.PngImageFile)
236237
assert im.bit_depth == expected_bit_depth
237238

238239
def test_load_transparent_p(self) -> None:

0 commit comments

Comments
 (0)