Add 'from __future__ import annotations' using Ruff/isort

This commit is contained in:
Hugo van Kemenade 2023-12-21 13:13:31 +02:00
parent 905ae8b5d1
commit 43b2f61e79
279 changed files with 301 additions and 19 deletions

View File

@ -6,6 +6,8 @@ This sort of info is missing from GitHub Actions.
Requested here:
https://github.com/actions/virtual-environments/issues/79
"""
from __future__ import annotations
import os
import platform
import sys

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations
import sys

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import time
from PIL import PyAccess

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import Image
TEST_FILE = "Tests/images/fli_overflow.fli"

View File

@ -1,5 +1,6 @@
# Tests potential DOS of IcnsImagePlugin with 0 length block.
# Run from anywhere that PIL is importable.
from __future__ import annotations
from io import BytesIO

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -1,5 +1,6 @@
# Tests potential DOS of Jpeg2kImagePlugin with 0 length block.
# Run from anywhere that PIL is importable.
from __future__ import annotations
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -12,6 +12,7 @@
# the output should be empty. There may be python issues
# in the valgrind especially if run in a debug python
# version.
from __future__ import annotations
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import sys
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import sys
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import zlib
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import sys
from pathlib import Path

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import sys
from PIL import features

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations
import base64
import os

View File

@ -1,6 +1,7 @@
"""
Helper functions.
"""
from __future__ import annotations
import logging
import os

View File

@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations
import atheris

View File

@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations
import atheris

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import warnings

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import subprocess
import sys

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import _binary

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import warnings

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, ImageFilter

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from array import array
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import sys
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import _deprecate

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import re

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, ImageSequence, PngImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import BufrStubImagePlugin, Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import ContainerIO, Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import CurImagePlugin, Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import warnings
import pytest

View File

@ -1,4 +1,5 @@
"""Test DdsImagePlugin"""
from __future__ import annotations
from io import BytesIO
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import warnings
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import FtexImagePlugin, Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import GbrImagePlugin, Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import GdImageFile, UnidentifiedImageError

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import warnings
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import GimpGradientFile, ImagePalette

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL.GimpPaletteFile import GimpPaletteFile

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import GribStubImagePlugin, Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Hdf5StubImagePlugin, Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import os
import warnings

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import os

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import filecmp
import warnings

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import sys
from io import BytesIO, StringIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import re
import warnings

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import re
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import base64
import io
import itertools

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, McIdasImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, ImagePalette

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import warnings
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os.path
import subprocess

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, ImageFile, PcxImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import os
import os.path

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, PixarImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import re
import sys
import warnings

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import sys
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import warnings
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, QoiImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, SgiImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import tempfile
import warnings
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import warnings
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
from glob import glob
from itertools import product

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import warnings
from io import BytesIO

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import struct

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import WalImageFile
from .helper import assert_image_equal_tofile

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import io
import re
import sys

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from packaging.version import parse as parse_version

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, WmfImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, XpmImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, XVThumbImagePlugin

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import BdfFontFile, FontFile

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from PIL import Image, ImageDraw, ImageFont

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import Image, ImageDraw, ImageFont
from .helper import PillowLeakTestCase, skip_unless_feature

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import os
import pytest

View File

@ -1,3 +1,4 @@
from __future__ import annotations
import colorsys
import itertools

View File

@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import Image

Some files were not shown because too many files have changed in this diff Show More