diff --git a/Tests/test_file_jxl_animated.py b/Tests/test_file_jxl_animated.py index 758fa79e2..02aca5eb0 100644 --- a/Tests/test_file_jxl_animated.py +++ b/Tests/test_file_jxl_animated.py @@ -59,7 +59,8 @@ def test_seeking() -> None: assert im1.info["timestamp"] == im1.info["timestamp"] assert total_dur == 8000 - assert im1.tell() == 0 and im2.tell() == 0 + assert im1.tell() == 0 + assert im2.tell() == 0 im1.seek(0) im1.load() diff --git a/src/PIL/JpegXlImagePlugin.py b/src/PIL/JpegXlImagePlugin.py index 4e475bf4a..32ef33f28 100644 --- a/src/PIL/JpegXlImagePlugin.py +++ b/src/PIL/JpegXlImagePlugin.py @@ -2,6 +2,7 @@ from __future__ import annotations import struct from io import BytesIO +from typing import Any from . import Image, ImageFile @@ -81,7 +82,7 @@ class JpegXlImageFile(ImageFile.ImageFile): exif_start_offset = struct.unpack(">I", exif[:4])[0] return exif[exif_start_offset + 4 :] - def _getexif(self) -> dict[str, str] | None: + def _getexif(self) -> dict[int, Any] | None: if "exif" not in self.info: return None return self.getexif()._get_merged_dict() diff --git a/src/PIL/_jpegxl.pyi b/src/PIL/_jpegxl.pyi index b0235555d..e27843e53 100644 --- a/src/PIL/_jpegxl.pyi +++ b/src/PIL/_jpegxl.pyi @@ -1,5 +1,3 @@ -from __future__ import annotations - from typing import Any def __getattr__(name: str) -> Any: ...