diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index e2913e944..4958b2222 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -776,7 +776,7 @@ class TestFilePng: mystdout: MyStdOut | BytesIO = MyStdOut() if buffer else BytesIO() - sys.stdout = mystdout # type: ignore[assignment] + sys.stdout = mystdout with Image.open(TEST_PNG_FILE) as im: im.save(sys.stdout, "PNG") diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py index d6451ec18..0a61830a4 100644 --- a/Tests/test_file_ppm.py +++ b/Tests/test_file_ppm.py @@ -373,7 +373,7 @@ def test_save_stdout(buffer: bool) -> None: mystdout: MyStdOut | BytesIO = MyStdOut() if buffer else BytesIO() - sys.stdout = mystdout # type: ignore[assignment] + sys.stdout = mystdout with Image.open(TEST_FILE) as im: im.save(sys.stdout, "PPM") diff --git a/Tests/test_psdraw.py b/Tests/test_psdraw.py index 130ffa863..c3afa9089 100644 --- a/Tests/test_psdraw.py +++ b/Tests/test_psdraw.py @@ -59,7 +59,7 @@ def test_stdout(buffer: bool) -> None: mystdout: MyStdOut | BytesIO = MyStdOut() if buffer else BytesIO() - sys.stdout = mystdout # type: ignore[assignment] + sys.stdout = mystdout ps = PSDraw.PSDraw() _create_document(ps)