From eddbdd254da876a1972dd3a23fef2701f9dd9ee1 Mon Sep 17 00:00:00 2001 From: AJ Slater Date: Fri, 1 May 2026 15:22:31 -0700 Subject: [PATCH] Narrow Image type for bit_depth assertions to fix mypy --- Tests/test_file_png.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index 4c7253b38..87493c75c 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -233,6 +233,7 @@ class TestFilePng: ) def test_bit_depth(self, test_file: str, expected_bit_depth: int) -> None: with Image.open(test_file) as im: + assert isinstance(im, PngImagePlugin.PngImageFile) assert im.bit_depth == expected_bit_depth def test_load_transparent_p(self) -> None: