diff --git a/Tests/bench_cffi_access.py b/Tests/bench_cffi_access.py index 8a37c7d5157..ad15a9739b2 100644 --- a/Tests/bench_cffi_access.py +++ b/Tests/bench_cffi_access.py @@ -1,4 +1,5 @@ from __future__ import annotations + import time from PIL import PyAccess diff --git a/Tests/check_fli_overflow.py b/Tests/check_fli_overflow.py index 0fabcb5d35f..8cb6ac0a6a8 100644 --- a/Tests/check_fli_overflow.py +++ b/Tests/check_fli_overflow.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image TEST_FILE = "Tests/images/fli_overflow.fli" diff --git a/Tests/check_imaging_leaks.py b/Tests/check_imaging_leaks.py index 8c17c051d4b..eed326a4ca8 100755 --- a/Tests/check_imaging_leaks.py +++ b/Tests/check_imaging_leaks.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/check_j2k_leaks.py b/Tests/check_j2k_leaks.py index 83a12e2c29f..249c92cef86 100644 --- a/Tests/check_j2k_leaks.py +++ b/Tests/check_j2k_leaks.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO import pytest diff --git a/Tests/check_j2k_overflow.py b/Tests/check_j2k_overflow.py index 982f6ea74d2..6f3aa437ea1 100644 --- a/Tests/check_j2k_overflow.py +++ b/Tests/check_j2k_overflow.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/check_jp2_overflow.py b/Tests/check_jp2_overflow.py index 9afbff112b0..5adbb84b69c 100755 --- a/Tests/check_jp2_overflow.py +++ b/Tests/check_jp2_overflow.py @@ -14,7 +14,6 @@ # version. from __future__ import annotations - from PIL import Image repro = ("00r0_gray_l.jp2", "00r1_graya_la.jp2") diff --git a/Tests/check_jpeg_leaks.py b/Tests/check_jpeg_leaks.py index 3cd37c7af7b..147deb28593 100644 --- a/Tests/check_jpeg_leaks.py +++ b/Tests/check_jpeg_leaks.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO import pytest diff --git a/Tests/check_large_memory.py b/Tests/check_large_memory.py index 9b83798d5e7..fb336f6e142 100644 --- a/Tests/check_large_memory.py +++ b/Tests/check_large_memory.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys import pytest diff --git a/Tests/check_large_memory_numpy.py b/Tests/check_large_memory_numpy.py index 0ff3de8dcc7..d91d615f8f8 100644 --- a/Tests/check_large_memory_numpy.py +++ b/Tests/check_large_memory_numpy.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys import pytest diff --git a/Tests/check_libtiff_segfault.py b/Tests/check_libtiff_segfault.py index ee1d7d11f0c..17b5336286f 100644 --- a/Tests/check_libtiff_segfault.py +++ b/Tests/check_libtiff_segfault.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/check_png_dos.py b/Tests/check_png_dos.py index 292fe4b7f09..7b0ed242435 100644 --- a/Tests/check_png_dos.py +++ b/Tests/check_png_dos.py @@ -1,4 +1,5 @@ from __future__ import annotations + import zlib from io import BytesIO diff --git a/Tests/check_release_notes.py b/Tests/check_release_notes.py index ebfaffa47e1..cf414d7fff0 100644 --- a/Tests/check_release_notes.py +++ b/Tests/check_release_notes.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys from pathlib import Path diff --git a/Tests/check_wheel.py b/Tests/check_wheel.py index afe4cc3eeaa..daf9e621148 100644 --- a/Tests/check_wheel.py +++ b/Tests/check_wheel.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys from PIL import features diff --git a/Tests/conftest.py b/Tests/conftest.py index cd64bd755f0..ac618c5b945 100644 --- a/Tests/conftest.py +++ b/Tests/conftest.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io diff --git a/Tests/createfontdatachunk.py b/Tests/createfontdatachunk.py index 2e990b70916..41c76f87eac 100755 --- a/Tests/createfontdatachunk.py +++ b/Tests/createfontdatachunk.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from __future__ import annotations + import base64 import os diff --git a/Tests/oss-fuzz/fuzzers.py b/Tests/oss-fuzz/fuzzers.py index 3afa952157b..d6c1fab714b 100644 --- a/Tests/oss-fuzz/fuzzers.py +++ b/Tests/oss-fuzz/fuzzers.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import warnings diff --git a/Tests/oss-fuzz/test_fuzzers.py b/Tests/oss-fuzz/test_fuzzers.py index 028ee71eec8..459cc1a3724 100644 --- a/Tests/oss-fuzz/test_fuzzers.py +++ b/Tests/oss-fuzz/test_fuzzers.py @@ -1,4 +1,5 @@ from __future__ import annotations + import subprocess import sys diff --git a/Tests/test_000_sanity.py b/Tests/test_000_sanity.py index c582dfad3e4..f64216bca8e 100644 --- a/Tests/test_000_sanity.py +++ b/Tests/test_000_sanity.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image diff --git a/Tests/test_binary.py b/Tests/test_binary.py index 62da2663668..41fb93fcf48 100644 --- a/Tests/test_binary.py +++ b/Tests/test_binary.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import _binary diff --git a/Tests/test_bmp_reference.py b/Tests/test_bmp_reference.py index bed8dc3a899..0da41e85845 100644 --- a/Tests/test_bmp_reference.py +++ b/Tests/test_bmp_reference.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import warnings diff --git a/Tests/test_box_blur.py b/Tests/test_box_blur.py index e798cba3d4f..461e6aaacb3 100644 --- a/Tests/test_box_blur.py +++ b/Tests/test_box_blur.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageFilter diff --git a/Tests/test_color_lut.py b/Tests/test_color_lut.py index 448ba2fac80..fcd1169ef81 100644 --- a/Tests/test_color_lut.py +++ b/Tests/test_color_lut.py @@ -1,4 +1,5 @@ from __future__ import annotations + from array import array import pytest diff --git a/Tests/test_core_resources.py b/Tests/test_core_resources.py index 5275652f66a..d3f76fdb1b9 100644 --- a/Tests/test_core_resources.py +++ b/Tests/test_core_resources.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys import pytest diff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py index 391948d40c7..d3049eff124 100644 --- a/Tests/test_decompression_bomb.py +++ b/Tests/test_decompression_bomb.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_deprecate.py b/Tests/test_deprecate.py index d45a6603c54..6c7f509a795 100644 --- a/Tests/test_deprecate.py +++ b/Tests/test_deprecate.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import _deprecate diff --git a/Tests/test_features.py b/Tests/test_features.py index 8f0e4b4184a..b90c1d25f2b 100644 --- a/Tests/test_features.py +++ b/Tests/test_features.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import re diff --git a/Tests/test_file_apng.py b/Tests/test_file_apng.py index e2c4569cee5..23263b5d459 100644 --- a/Tests/test_file_apng.py +++ b/Tests/test_file_apng.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageSequence, PngImagePlugin diff --git a/Tests/test_file_blp.py b/Tests/test_file_blp.py index 4c1e38d1ddf..27ff7ab6640 100644 --- a/Tests/test_file_blp.py +++ b/Tests/test_file_blp.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py index 4cc92c5f684..225fb28ba51 100644 --- a/Tests/test_file_bmp.py +++ b/Tests/test_file_bmp.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import pytest diff --git a/Tests/test_file_bufrstub.py b/Tests/test_file_bufrstub.py index 5780232a2d6..45081832e68 100644 --- a/Tests/test_file_bufrstub.py +++ b/Tests/test_file_bufrstub.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import BufrStubImagePlugin, Image diff --git a/Tests/test_file_container.py b/Tests/test_file_container.py index 0da5d3824b0..95a5b2337d8 100644 --- a/Tests/test_file_container.py +++ b/Tests/test_file_container.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import ContainerIO, Image diff --git a/Tests/test_file_cur.py b/Tests/test_file_cur.py index 08c3257f9d1..27b2bc91489 100644 --- a/Tests/test_file_cur.py +++ b/Tests/test_file_cur.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import CurImagePlugin, Image diff --git a/Tests/test_file_dcx.py b/Tests/test_file_dcx.py index 25e4badbc92..cba7c10bf76 100644 --- a/Tests/test_file_dcx.py +++ b/Tests/test_file_dcx.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings import pytest diff --git a/Tests/test_file_dds.py b/Tests/test_file_dds.py index a605c8399d8..7064b74c07b 100644 --- a/Tests/test_file_dds.py +++ b/Tests/test_file_dds.py @@ -1,5 +1,6 @@ """Test DdsImagePlugin""" from __future__ import annotations + from io import BytesIO import pytest diff --git a/Tests/test_file_eps.py b/Tests/test_file_eps.py index 8b48e83ad2c..8def9a43511 100644 --- a/Tests/test_file_eps.py +++ b/Tests/test_file_eps.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import pytest diff --git a/Tests/test_file_fits.py b/Tests/test_file_fits.py index 1383f9c5ca3..7444eb673cb 100644 --- a/Tests/test_file_fits.py +++ b/Tests/test_file_fits.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO import pytest diff --git a/Tests/test_file_fli.py b/Tests/test_file_fli.py index 10bf36cc290..00377e0c92d 100644 --- a/Tests/test_file_fli.py +++ b/Tests/test_file_fli.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings import pytest diff --git a/Tests/test_file_fpx.py b/Tests/test_file_fpx.py index af3b7981561..d710070c01b 100644 --- a/Tests/test_file_fpx.py +++ b/Tests/test_file_fpx.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_file_ftex.py b/Tests/test_file_ftex.py index a494c8029c9..0f9154e3d09 100644 --- a/Tests/test_file_ftex.py +++ b/Tests/test_file_ftex.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import FtexImagePlugin, Image diff --git a/Tests/test_file_gbr.py b/Tests/test_file_gbr.py index 7dfe0539673..d84004e1483 100644 --- a/Tests/test_file_gbr.py +++ b/Tests/test_file_gbr.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import GbrImagePlugin, Image diff --git a/Tests/test_file_gd.py b/Tests/test_file_gd.py index ec80c54a122..e7db54fb44c 100644 --- a/Tests/test_file_gd.py +++ b/Tests/test_file_gd.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import GdImageFile, UnidentifiedImageError diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 78b77e9743a..3e19940aab9 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings from io import BytesIO diff --git a/Tests/test_file_gimpgradient.py b/Tests/test_file_gimpgradient.py index d5be46dc39e..ceea1edd34c 100644 --- a/Tests/test_file_gimpgradient.py +++ b/Tests/test_file_gimpgradient.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import GimpGradientFile, ImagePalette diff --git a/Tests/test_file_gimppalette.py b/Tests/test_file_gimppalette.py index 775d3b7cdae..28855c28acc 100644 --- a/Tests/test_file_gimppalette.py +++ b/Tests/test_file_gimppalette.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL.GimpPaletteFile import GimpPaletteFile diff --git a/Tests/test_file_gribstub.py b/Tests/test_file_gribstub.py index d962e85a436..a4ce6dde674 100644 --- a/Tests/test_file_gribstub.py +++ b/Tests/test_file_gribstub.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import GribStubImagePlugin, Image diff --git a/Tests/test_file_hdf5stub.py b/Tests/test_file_hdf5stub.py index 9c776b712ee..72764461730 100644 --- a/Tests/test_file_hdf5stub.py +++ b/Tests/test_file_hdf5stub.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Hdf5StubImagePlugin, Image diff --git a/Tests/test_file_icns.py b/Tests/test_file_icns.py index c62fffc5be8..314fa800868 100644 --- a/Tests/test_file_icns.py +++ b/Tests/test_file_icns.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import os import warnings diff --git a/Tests/test_file_ico.py b/Tests/test_file_ico.py index de9fa353adb..99b3048d1e0 100644 --- a/Tests/test_file_ico.py +++ b/Tests/test_file_ico.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import os diff --git a/Tests/test_file_im.py b/Tests/test_file_im.py index 0cb26d06a51..a031b3e887c 100644 --- a/Tests/test_file_im.py +++ b/Tests/test_file_im.py @@ -1,4 +1,5 @@ from __future__ import annotations + import filecmp import warnings diff --git a/Tests/test_file_imt.py b/Tests/test_file_imt.py index 3db4885586a..aa13d4407bc 100644 --- a/Tests/test_file_imt.py +++ b/Tests/test_file_imt.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import pytest diff --git a/Tests/test_file_iptc.py b/Tests/test_file_iptc.py index c44a08f526a..a2c50ecefdf 100644 --- a/Tests/test_file_iptc.py +++ b/Tests/test_file_iptc.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys from io import BytesIO, StringIO diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index 979c7e33d00..232e51f9126 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import re import warnings diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py index aaa4104e57c..94b02c9ff52 100644 --- a/Tests/test_file_jpeg2k.py +++ b/Tests/test_file_jpeg2k.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import re from io import BytesIO diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 65adf449dcc..494253c87c1 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -1,4 +1,5 @@ from __future__ import annotations + import base64 import io import itertools diff --git a/Tests/test_file_libtiff_small.py b/Tests/test_file_libtiff_small.py index 9501c55a6b8..171e4a3f866 100644 --- a/Tests/test_file_libtiff_small.py +++ b/Tests/test_file_libtiff_small.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO from PIL import Image diff --git a/Tests/test_file_mcidas.py b/Tests/test_file_mcidas.py index 4b31aaa7857..73eba5cc861 100644 --- a/Tests/test_file_mcidas.py +++ b/Tests/test_file_mcidas.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, McIdasImagePlugin diff --git a/Tests/test_file_mic.py b/Tests/test_file_mic.py index e7ea39ea918..8c43f7d7ab7 100644 --- a/Tests/test_file_mic.py +++ b/Tests/test_file_mic.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImagePalette diff --git a/Tests/test_file_mpo.py b/Tests/test_file_mpo.py index da62bc6d429..c7121ea28c9 100644 --- a/Tests/test_file_mpo.py +++ b/Tests/test_file_mpo.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings from io import BytesIO diff --git a/Tests/test_file_msp.py b/Tests/test_file_msp.py index f4e357ae0fd..9037ea33b54 100644 --- a/Tests/test_file_msp.py +++ b/Tests/test_file_msp.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import pytest diff --git a/Tests/test_file_palm.py b/Tests/test_file_palm.py index 735840de4cb..eba69415395 100644 --- a/Tests/test_file_palm.py +++ b/Tests/test_file_palm.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os.path import subprocess diff --git a/Tests/test_file_pcd.py b/Tests/test_file_pcd.py index 596a3414f79..1a37c6ab31d 100644 --- a/Tests/test_file_pcd.py +++ b/Tests/test_file_pcd.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image diff --git a/Tests/test_file_pcx.py b/Tests/test_file_pcx.py index f42ec4a6894..2565e0b6ddc 100644 --- a/Tests/test_file_pcx.py +++ b/Tests/test_file_pcx.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageFile, PcxImagePlugin diff --git a/Tests/test_file_pdf.py b/Tests/test_file_pdf.py index 9e07d9ed014..30c54c963cb 100644 --- a/Tests/test_file_pdf.py +++ b/Tests/test_file_pdf.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import os import os.path diff --git a/Tests/test_file_pixar.py b/Tests/test_file_pixar.py index 63779f202cb..c6ddc54e714 100644 --- a/Tests/test_file_pixar.py +++ b/Tests/test_file_pixar.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, PixarImagePlugin diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index ff386211061..ae2a4772b60 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -1,4 +1,5 @@ from __future__ import annotations + import re import sys import warnings diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py index d8e259b1cf8..32de42ed45d 100644 --- a/Tests/test_file_ppm.py +++ b/Tests/test_file_ppm.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys from io import BytesIO diff --git a/Tests/test_file_psd.py b/Tests/test_file_psd.py index 8b06ce2b163..16f049602bc 100644 --- a/Tests/test_file_psd.py +++ b/Tests/test_file_psd.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings import pytest diff --git a/Tests/test_file_qoi.py b/Tests/test_file_qoi.py index b7c9457294d..6dc468754ef 100644 --- a/Tests/test_file_qoi.py +++ b/Tests/test_file_qoi.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, QoiImagePlugin diff --git a/Tests/test_file_sgi.py b/Tests/test_file_sgi.py index 13698276b8c..bc45bbfd34d 100644 --- a/Tests/test_file_sgi.py +++ b/Tests/test_file_sgi.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, SgiImagePlugin diff --git a/Tests/test_file_spider.py b/Tests/test_file_spider.py index f2109875478..42d833fb25c 100644 --- a/Tests/test_file_spider.py +++ b/Tests/test_file_spider.py @@ -1,4 +1,5 @@ from __future__ import annotations + import tempfile import warnings from io import BytesIO diff --git a/Tests/test_file_sun.py b/Tests/test_file_sun.py index 874b37b5285..41f3b7d98f3 100644 --- a/Tests/test_file_sun.py +++ b/Tests/test_file_sun.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import pytest diff --git a/Tests/test_file_tar.py b/Tests/test_file_tar.py index 4470823cdbd..58226c33062 100644 --- a/Tests/test_file_tar.py +++ b/Tests/test_file_tar.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings import pytest diff --git a/Tests/test_file_tga.py b/Tests/test_file_tga.py index d0f228573bb..eafb61d30af 100644 --- a/Tests/test_file_tga.py +++ b/Tests/test_file_tga.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os from glob import glob from itertools import product diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index a50f50e5e96..f0995679b1f 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import warnings from io import BytesIO diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py index ee69681854e..06689bc9092 100644 --- a/Tests/test_file_tiff_metadata.py +++ b/Tests/test_file_tiff_metadata.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import struct diff --git a/Tests/test_file_wal.py b/Tests/test_file_wal.py index 0b84d0320aa..7acec975942 100644 --- a/Tests/test_file_wal.py +++ b/Tests/test_file_wal.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import WalImageFile from .helper import assert_image_equal_tofile diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py index c91818ef64e..c49418ce3c5 100644 --- a/Tests/test_file_webp.py +++ b/Tests/test_file_webp.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import re import sys diff --git a/Tests/test_file_webp_alpha.py b/Tests/test_file_webp_alpha.py index 79d01a4446a..cfda35a0962 100644 --- a/Tests/test_file_webp_alpha.py +++ b/Tests/test_file_webp_alpha.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_file_webp_animated.py b/Tests/test_file_webp_animated.py index 22acb4be68f..426fe7a0293 100644 --- a/Tests/test_file_webp_animated.py +++ b/Tests/test_file_webp_animated.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from packaging.version import parse as parse_version diff --git a/Tests/test_file_webp_lossless.py b/Tests/test_file_webp_lossless.py index 6acf58ac3f5..08c80973a74 100644 --- a/Tests/test_file_webp_lossless.py +++ b/Tests/test_file_webp_lossless.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_file_webp_metadata.py b/Tests/test_file_webp_metadata.py index a7b7bbcf6ee..deaf5e380db 100644 --- a/Tests/test_file_webp_metadata.py +++ b/Tests/test_file_webp_metadata.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO import pytest diff --git a/Tests/test_file_wmf.py b/Tests/test_file_wmf.py index 596dc8ba181..6e1d4c1361f 100644 --- a/Tests/test_file_wmf.py +++ b/Tests/test_file_wmf.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, WmfImagePlugin diff --git a/Tests/test_file_xbm.py b/Tests/test_file_xbm.py index b086ffd683f..69a0a1b38d8 100644 --- a/Tests/test_file_xbm.py +++ b/Tests/test_file_xbm.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO import pytest diff --git a/Tests/test_file_xpm.py b/Tests/test_file_xpm.py index 265feab4294..529a4558073 100644 --- a/Tests/test_file_xpm.py +++ b/Tests/test_file_xpm.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, XpmImagePlugin diff --git a/Tests/test_file_xvthumb.py b/Tests/test_file_xvthumb.py index 5848995c1aa..b87494eba18 100644 --- a/Tests/test_file_xvthumb.py +++ b/Tests/test_file_xvthumb.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, XVThumbImagePlugin diff --git a/Tests/test_font_bdf.py b/Tests/test_font_bdf.py index 1e5eff2f15d..e5e85618651 100644 --- a/Tests/test_font_bdf.py +++ b/Tests/test_font_bdf.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import BdfFontFile, FontFile diff --git a/Tests/test_font_crash.py b/Tests/test_font_crash.py index 388ee711861..e3c72c1aebd 100644 --- a/Tests/test_font_crash.py +++ b/Tests/test_font_crash.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageDraw, ImageFont diff --git a/Tests/test_font_leaks.py b/Tests/test_font_leaks.py index 6a038bb4038..4e29a856bc9 100644 --- a/Tests/test_font_leaks.py +++ b/Tests/test_font_leaks.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image, ImageDraw, ImageFont from .helper import PillowLeakTestCase, skip_unless_feature diff --git a/Tests/test_font_pcf.py b/Tests/test_font_pcf.py index 4365b931066..e6abede0787 100644 --- a/Tests/test_font_pcf.py +++ b/Tests/test_font_pcf.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import pytest diff --git a/Tests/test_font_pcf_charsets.py b/Tests/test_font_pcf_charsets.py index 950e5029ff5..4c2d7185e3c 100644 --- a/Tests/test_font_pcf_charsets.py +++ b/Tests/test_font_pcf_charsets.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import pytest diff --git a/Tests/test_fontfile.py b/Tests/test_fontfile.py index ce1e02f63e0..eda8fb81283 100644 --- a/Tests/test_fontfile.py +++ b/Tests/test_fontfile.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import FontFile diff --git a/Tests/test_format_hsv.py b/Tests/test_format_hsv.py index fd47fae39ba..6395ae4aad8 100644 --- a/Tests/test_format_hsv.py +++ b/Tests/test_format_hsv.py @@ -1,4 +1,5 @@ from __future__ import annotations + import colorsys import itertools diff --git a/Tests/test_format_lab.py b/Tests/test_format_lab.py index c7610ce8a6c..a55620e09ab 100644 --- a/Tests/test_format_lab.py +++ b/Tests/test_format_lab.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image diff --git a/Tests/test_image.py b/Tests/test_image.py index 80f6583d8d9..dd989ad99b5 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -1,4 +1,5 @@ from __future__ import annotations + import io import logging import os diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index 4a794371d67..4ae56fae0cc 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import subprocess import sys diff --git a/Tests/test_image_array.py b/Tests/test_image_array.py index b3e5d9e3e08..0dacb3157a2 100644 --- a/Tests/test_image_array.py +++ b/Tests/test_image_array.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from packaging.version import parse as parse_version diff --git a/Tests/test_image_convert.py b/Tests/test_image_convert.py index 7c17040d30b..d4ddc2a31b2 100644 --- a/Tests/test_image_convert.py +++ b/Tests/test_image_convert.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_image_copy.py b/Tests/test_image_copy.py index abf5f846f89..3a26ef96e74 100644 --- a/Tests/test_image_copy.py +++ b/Tests/test_image_copy.py @@ -1,4 +1,5 @@ from __future__ import annotations + import copy import pytest diff --git a/Tests/test_image_crop.py b/Tests/test_image_crop.py index 0bb54e5d811..5e02a3b0dfc 100644 --- a/Tests/test_image_crop.py +++ b/Tests/test_image_crop.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_image_draft.py b/Tests/test_image_draft.py index 774272dd1f7..08c40af1f16 100644 --- a/Tests/test_image_draft.py +++ b/Tests/test_image_draft.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image from .helper import fromstring, skip_unless_feature, tostring diff --git a/Tests/test_image_entropy.py b/Tests/test_image_entropy.py index 031fceda3fa..fce16122409 100644 --- a/Tests/test_image_entropy.py +++ b/Tests/test_image_entropy.py @@ -1,4 +1,5 @@ from __future__ import annotations + from .helper import hopper diff --git a/Tests/test_image_filter.py b/Tests/test_image_filter.py index 5bd7ee0d273..3fa5dd2423a 100644 --- a/Tests/test_image_filter.py +++ b/Tests/test_image_filter.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageFilter diff --git a/Tests/test_image_frombytes.py b/Tests/test_image_frombytes.py index 017da499d2c..5d5e9f2dfc9 100644 --- a/Tests/test_image_frombytes.py +++ b/Tests/test_image_frombytes.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_image_fromqimage.py b/Tests/test_image_fromqimage.py index b3ca43bde6d..76b576da56b 100644 --- a/Tests/test_image_fromqimage.py +++ b/Tests/test_image_fromqimage.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings import pytest diff --git a/Tests/test_image_getbands.py b/Tests/test_image_getbands.py index e7701dbc460..64339e2cd85 100644 --- a/Tests/test_image_getbands.py +++ b/Tests/test_image_getbands.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image diff --git a/Tests/test_image_getbbox.py b/Tests/test_image_getbbox.py index 9e792cfdf7c..b18a7202e38 100644 --- a/Tests/test_image_getbbox.py +++ b/Tests/test_image_getbbox.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_image_getcolors.py b/Tests/test_image_getcolors.py index dea3a60a112..17460fa93f5 100644 --- a/Tests/test_image_getcolors.py +++ b/Tests/test_image_getcolors.py @@ -1,4 +1,5 @@ from __future__ import annotations + from .helper import hopper diff --git a/Tests/test_image_getdata.py b/Tests/test_image_getdata.py index 873cc65bf91..ace64279b8c 100644 --- a/Tests/test_image_getdata.py +++ b/Tests/test_image_getdata.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image from .helper import hopper diff --git a/Tests/test_image_getextrema.py b/Tests/test_image_getextrema.py index b17c8a786dd..6bbc4da9a01 100644 --- a/Tests/test_image_getextrema.py +++ b/Tests/test_image_getextrema.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image from .helper import hopper diff --git a/Tests/test_image_getim.py b/Tests/test_image_getim.py index e969c8164a2..bc8a7485eb0 100644 --- a/Tests/test_image_getim.py +++ b/Tests/test_image_getim.py @@ -1,4 +1,5 @@ from __future__ import annotations + from .helper import hopper diff --git a/Tests/test_image_getpalette.py b/Tests/test_image_getpalette.py index a5be972d3ed..4340f46f619 100644 --- a/Tests/test_image_getpalette.py +++ b/Tests/test_image_getpalette.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image from .helper import hopper diff --git a/Tests/test_image_getprojection.py b/Tests/test_image_getprojection.py index aa47be3b2e0..e90f5f5056f 100644 --- a/Tests/test_image_getprojection.py +++ b/Tests/test_image_getprojection.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image from .helper import hopper diff --git a/Tests/test_image_histogram.py b/Tests/test_image_histogram.py index 7ba2f10b765..3ac6649e074 100644 --- a/Tests/test_image_histogram.py +++ b/Tests/test_image_histogram.py @@ -1,4 +1,5 @@ from __future__ import annotations + from .helper import hopper diff --git a/Tests/test_image_load.py b/Tests/test_image_load.py index 17847c4fd9c..36f8ba575d8 100644 --- a/Tests/test_image_load.py +++ b/Tests/test_image_load.py @@ -1,4 +1,5 @@ from __future__ import annotations + import logging import os diff --git a/Tests/test_image_mode.py b/Tests/test_image_mode.py index ad90d1250dc..3c1d494fab2 100644 --- a/Tests/test_image_mode.py +++ b/Tests/test_image_mode.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageMode diff --git a/Tests/test_image_paste.py b/Tests/test_image_paste.py index 0b87f607286..fd117f9dbc9 100644 --- a/Tests/test_image_paste.py +++ b/Tests/test_image_paste.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_image_point.py b/Tests/test_image_point.py index fce45ec4f0e..2232b94429d 100644 --- a/Tests/test_image_point.py +++ b/Tests/test_image_point.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from .helper import assert_image_equal, hopper diff --git a/Tests/test_image_putalpha.py b/Tests/test_image_putalpha.py index 0ba7e5919a5..c44b048d523 100644 --- a/Tests/test_image_putalpha.py +++ b/Tests/test_image_putalpha.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image diff --git a/Tests/test_image_putdata.py b/Tests/test_image_putdata.py index d3cb13e2e97..2648af8fa2e 100644 --- a/Tests/test_image_putdata.py +++ b/Tests/test_image_putdata.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys from array import array diff --git a/Tests/test_image_putpalette.py b/Tests/test_image_putpalette.py index de2d9024213..43b65be2b17 100644 --- a/Tests/test_image_putpalette.py +++ b/Tests/test_image_putpalette.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImagePalette diff --git a/Tests/test_image_quantize.py b/Tests/test_image_quantize.py index 54c567aae6c..1475b027bd8 100644 --- a/Tests/test_image_quantize.py +++ b/Tests/test_image_quantize.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from packaging.version import parse as parse_version diff --git a/Tests/test_image_reduce.py b/Tests/test_image_reduce.py index a4d0f510761..ba9100415a2 100644 --- a/Tests/test_image_reduce.py +++ b/Tests/test_image_reduce.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageMath, ImageMode diff --git a/Tests/test_image_resample.py b/Tests/test_image_resample.py index 5a578dba5c4..af730dce13d 100644 --- a/Tests/test_image_resample.py +++ b/Tests/test_image_resample.py @@ -1,4 +1,5 @@ from __future__ import annotations + from contextlib import contextmanager import pytest diff --git a/Tests/test_image_resize.py b/Tests/test_image_resize.py index 0d3b43ee29f..aedcf4a09b5 100644 --- a/Tests/test_image_resize.py +++ b/Tests/test_image_resize.py @@ -2,6 +2,7 @@ Tests for resize functionality. """ from __future__ import annotations + from itertools import permutations import pytest diff --git a/Tests/test_image_rotate.py b/Tests/test_image_rotate.py index 0931aa32d98..e63fef2c152 100644 --- a/Tests/test_image_rotate.py +++ b/Tests/test_image_rotate.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_image_split.py b/Tests/test_image_split.py index 707508250f6..c39a100e777 100644 --- a/Tests/test_image_split.py +++ b/Tests/test_image_split.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, features diff --git a/Tests/test_image_thumbnail.py b/Tests/test_image_thumbnail.py index 9e6796ca299..7fa5692aa7d 100644 --- a/Tests/test_image_thumbnail.py +++ b/Tests/test_image_thumbnail.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_image_tobitmap.py b/Tests/test_image_tobitmap.py index 156b9919d27..89a41cf8ec2 100644 --- a/Tests/test_image_tobitmap.py +++ b/Tests/test_image_tobitmap.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from .helper import assert_image_equal, fromstring, hopper diff --git a/Tests/test_image_tobytes.py b/Tests/test_image_tobytes.py index f6042bca527..8f15adac065 100644 --- a/Tests/test_image_tobytes.py +++ b/Tests/test_image_tobytes.py @@ -1,4 +1,5 @@ from __future__ import annotations + from .helper import hopper diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index f5d5ab70408..0fe9fd1d5f5 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -1,4 +1,5 @@ from __future__ import annotations + import math import pytest diff --git a/Tests/test_image_transpose.py b/Tests/test_image_transpose.py index 66a2d9e2955..01bf5a83918 100644 --- a/Tests/test_image_transpose.py +++ b/Tests/test_image_transpose.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL.Image import Transpose diff --git a/Tests/test_imagechops.py b/Tests/test_imagechops.py index 8e3a738d708..2f0614385aa 100644 --- a/Tests/test_imagechops.py +++ b/Tests/test_imagechops.py @@ -1,4 +1,5 @@ from __future__ import annotations + from PIL import Image, ImageChops from .helper import assert_image_equal, hopper diff --git a/Tests/test_imagecms.py b/Tests/test_imagecms.py index 810394e6f5f..03332699a1d 100644 --- a/Tests/test_imagecms.py +++ b/Tests/test_imagecms.py @@ -1,4 +1,5 @@ from __future__ import annotations + import datetime import os import re diff --git a/Tests/test_imagecolor.py b/Tests/test_imagecolor.py index c0ffd2ebf0b..b602172b642 100644 --- a/Tests/test_imagecolor.py +++ b/Tests/test_imagecolor.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageColor diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index 379fe78cd8a..69aab48912b 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -1,4 +1,5 @@ from __future__ import annotations + import contextlib import os.path diff --git a/Tests/test_imagedraw2.py b/Tests/test_imagedraw2.py index d729af14d3a..004c2d768fd 100644 --- a/Tests/test_imagedraw2.py +++ b/Tests/test_imagedraw2.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os.path import pytest diff --git a/Tests/test_imageenhance.py b/Tests/test_imageenhance.py index f4e4d59be32..e3d8a7ab251 100644 --- a/Tests/test_imageenhance.py +++ b/Tests/test_imageenhance.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageEnhance diff --git a/Tests/test_imagefile.py b/Tests/test_imagefile.py index 4804a554f83..99731f35208 100644 --- a/Tests/test_imagefile.py +++ b/Tests/test_imagefile.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO import pytest diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index 807d581edf0..d2c87d42aaa 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -1,4 +1,5 @@ from __future__ import annotations + import copy import os import re diff --git a/Tests/test_imagefontctl.py b/Tests/test_imagefontctl.py index bea532b051e..09e68ea488a 100644 --- a/Tests/test_imagefontctl.py +++ b/Tests/test_imagefontctl.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageDraw, ImageFont diff --git a/Tests/test_imagefontpil.py b/Tests/test_imagefontpil.py index 9e085510149..be4be1c546e 100644 --- a/Tests/test_imagefontpil.py +++ b/Tests/test_imagefontpil.py @@ -1,9 +1,11 @@ from __future__ import annotations + import struct -import pytest from io import BytesIO -from PIL import Image, ImageDraw, ImageFont, features, _util +import pytest + +from PIL import Image, ImageDraw, ImageFont, _util, features from .helper import assert_image_equal_tofile diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index b7683ec1817..9d3d40398f6 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import shutil import subprocess diff --git a/Tests/test_imagemath.py b/Tests/test_imagemath.py index 9281de6f66a..622ad27eacb 100644 --- a/Tests/test_imagemath.py +++ b/Tests/test_imagemath.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageMath diff --git a/Tests/test_imagemorph.py b/Tests/test_imagemorph.py index 64a1785ea97..0708ee63905 100644 --- a/Tests/test_imagemorph.py +++ b/Tests/test_imagemorph.py @@ -1,5 +1,6 @@ # Test the ImageMorphology functionality from __future__ import annotations + import pytest from PIL import Image, ImageMorph, _imagingmorph diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py index 7980bead0a4..636b99dbe8f 100644 --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageDraw, ImageOps, ImageStat, features diff --git a/Tests/test_imageops_usm.py b/Tests/test_imageops_usm.py index 84d3a69507a..8ffb9bff7a2 100644 --- a/Tests/test_imageops_usm.py +++ b/Tests/test_imageops_usm.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageFilter diff --git a/Tests/test_imagepalette.py b/Tests/test_imagepalette.py index e5b59b74a84..be21464b4ae 100644 --- a/Tests/test_imagepalette.py +++ b/Tests/test_imagepalette.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImagePalette diff --git a/Tests/test_imagepath.py b/Tests/test_imagepath.py index ac3ea3281f5..5c6393e237f 100644 --- a/Tests/test_imagepath.py +++ b/Tests/test_imagepath.py @@ -1,4 +1,5 @@ from __future__ import annotations + import array import math import struct diff --git a/Tests/test_imageqt.py b/Tests/test_imageqt.py index 41d247f429f..d55d980d9be 100644 --- a/Tests/test_imageqt.py +++ b/Tests/test_imageqt.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings import pytest diff --git a/Tests/test_imagesequence.py b/Tests/test_imagesequence.py index 6d71e4d87af..66d553bcbc7 100644 --- a/Tests/test_imagesequence.py +++ b/Tests/test_imagesequence.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageSequence, TiffImagePlugin diff --git a/Tests/test_imageshow.py b/Tests/test_imageshow.py index 761d28d3019..0996ad41d4d 100644 --- a/Tests/test_imageshow.py +++ b/Tests/test_imageshow.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageShow diff --git a/Tests/test_imagestat.py b/Tests/test_imagestat.py index 7b56b89cc4b..01687db353e 100644 --- a/Tests/test_imagestat.py +++ b/Tests/test_imagestat.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image, ImageStat diff --git a/Tests/test_imagetk.py b/Tests/test_imagetk.py index bb20fbb6f92..c06fc58235b 100644 --- a/Tests/test_imagetk.py +++ b/Tests/test_imagetk.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_imagewin.py b/Tests/test_imagewin.py index 6927eedcf86..f93eabcb4ff 100644 --- a/Tests/test_imagewin.py +++ b/Tests/test_imagewin.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import ImageWin diff --git a/Tests/test_imagewin_pointers.py b/Tests/test_imagewin_pointers.py index bd154335af7..63d6b903ca6 100644 --- a/Tests/test_imagewin_pointers.py +++ b/Tests/test_imagewin_pointers.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO from PIL import Image, ImageWin diff --git a/Tests/test_lib_image.py b/Tests/test_lib_image.py index 92cad4ac1b1..1c642e4c981 100644 --- a/Tests/test_lib_image.py +++ b/Tests/test_lib_image.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_lib_pack.py b/Tests/test_lib_pack.py index 1293f7628be..e2024abbf2e 100644 --- a/Tests/test_lib_pack.py +++ b/Tests/test_lib_pack.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys import pytest diff --git a/Tests/test_locale.py b/Tests/test_locale.py index 49b052fa485..db9557d7ba2 100644 --- a/Tests/test_locale.py +++ b/Tests/test_locale.py @@ -1,4 +1,5 @@ from __future__ import annotations + import locale import pytest diff --git a/Tests/test_main.py b/Tests/test_main.py index a84e61a7b7d..9f61a0c8169 100644 --- a/Tests/test_main.py +++ b/Tests/test_main.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import subprocess import sys diff --git a/Tests/test_map.py b/Tests/test_map.py index 76444f33d1c..9c79fe35906 100644 --- a/Tests/test_map.py +++ b/Tests/test_map.py @@ -1,4 +1,5 @@ from __future__ import annotations + import sys import pytest diff --git a/Tests/test_mode_i16.py b/Tests/test_mode_i16.py index 3e17d8dccde..d3ee511b7c2 100644 --- a/Tests/test_mode_i16.py +++ b/Tests/test_mode_i16.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index 6f0e99b3f93..24dff36a610 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -1,4 +1,5 @@ from __future__ import annotations + import warnings import pytest diff --git a/Tests/test_pdfparser.py b/Tests/test_pdfparser.py index aeeafb6f1df..a89d75b59d3 100644 --- a/Tests/test_pdfparser.py +++ b/Tests/test_pdfparser.py @@ -1,4 +1,5 @@ from __future__ import annotations + import time import pytest diff --git a/Tests/test_pickle.py b/Tests/test_pickle.py index eb687b57b62..c445e349447 100644 --- a/Tests/test_pickle.py +++ b/Tests/test_pickle.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pickle import pytest diff --git a/Tests/test_psdraw.py b/Tests/test_psdraw.py index 77c7952e912..7f618d0f53b 100644 --- a/Tests/test_psdraw.py +++ b/Tests/test_psdraw.py @@ -1,4 +1,5 @@ from __future__ import annotations + import os import sys from io import BytesIO diff --git a/Tests/test_pyroma.py b/Tests/test_pyroma.py index 08133b6c30c..c2cea08ca61 100644 --- a/Tests/test_pyroma.py +++ b/Tests/test_pyroma.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import __version__ diff --git a/Tests/test_qt_image_qapplication.py b/Tests/test_qt_image_qapplication.py index 49ca016771f..ad2b5ad9bf5 100644 --- a/Tests/test_qt_image_qapplication.py +++ b/Tests/test_qt_image_qapplication.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import ImageQt diff --git a/Tests/test_qt_image_toqimage.py b/Tests/test_qt_image_toqimage.py index 396bd9080ca..b26787ce668 100644 --- a/Tests/test_qt_image_toqimage.py +++ b/Tests/test_qt_image_toqimage.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import ImageQt diff --git a/Tests/test_sgi_crash.py b/Tests/test_sgi_crash.py index 37d72d451de..dee6258ecb5 100644 --- a/Tests/test_sgi_crash.py +++ b/Tests/test_sgi_crash.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import Image diff --git a/Tests/test_shell_injection.py b/Tests/test_shell_injection.py index d93b0390416..9f3e86a32a8 100644 --- a/Tests/test_shell_injection.py +++ b/Tests/test_shell_injection.py @@ -1,4 +1,5 @@ from __future__ import annotations + import shutil import pytest diff --git a/Tests/test_tiff_ifdrational.py b/Tests/test_tiff_ifdrational.py index e7b41fb4738..c07e7f7d395 100644 --- a/Tests/test_tiff_ifdrational.py +++ b/Tests/test_tiff_ifdrational.py @@ -1,4 +1,5 @@ from __future__ import annotations + from fractions import Fraction from PIL import Image, TiffImagePlugin, features diff --git a/Tests/test_uploader.py b/Tests/test_uploader.py index 6b693f7cd5d..75326288f97 100644 --- a/Tests/test_uploader.py +++ b/Tests/test_uploader.py @@ -1,4 +1,5 @@ from __future__ import annotations + from .helper import assert_image_equal, assert_image_similar, hopper diff --git a/Tests/test_util.py b/Tests/test_util.py index 4a312beb440..3395ef753d7 100644 --- a/Tests/test_util.py +++ b/Tests/test_util.py @@ -1,4 +1,5 @@ from __future__ import annotations + import pytest from PIL import _util diff --git a/Tests/test_webp_leaks.py b/Tests/test_webp_leaks.py index 28ebc7d79f1..0f51abc9574 100644 --- a/Tests/test_webp_leaks.py +++ b/Tests/test_webp_leaks.py @@ -1,4 +1,5 @@ from __future__ import annotations + from io import BytesIO from PIL import Image diff --git a/pyproject.toml b/pyproject.toml index 789df6f5e67..b1ce9cf1d07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,7 +119,6 @@ extend-ignore = [ ] [tool.ruff.per-file-ignores] -"Tests/*.py" = ["I001"] "Tests/oss-fuzz/fuzz_font.py" = ["I002"] "Tests/oss-fuzz/fuzz_pillow.py" = ["I002"]