mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 08:14:10 +03:00
Merge pull request #8252 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.11.0
This commit is contained in:
commit
906b8afe85
|
@ -1 +1 @@
|
|||
mypy==1.10.1
|
||||
mypy==1.11.0
|
||||
|
|
|
@ -85,7 +85,9 @@ def test_exif(test_file: str) -> None:
|
|||
im_reloaded = roundtrip(im_original, save_all=True, exif=im_original.getexif())
|
||||
|
||||
for im in (im_original, im_reloaded):
|
||||
assert isinstance(im, MpoImagePlugin.MpoImageFile)
|
||||
info = im._getexif()
|
||||
assert info is not None
|
||||
assert info[272] == "Nintendo 3DS"
|
||||
assert info[296] == 2
|
||||
assert info[34665] == 188
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -468,7 +468,7 @@ class JpegImageFile(ImageFile.ImageFile):
|
|||
|
||||
self.tile = []
|
||||
|
||||
def _getexif(self) -> dict[str, Any] | None:
|
||||
def _getexif(self) -> dict[int, Any] | None:
|
||||
return _getexif(self)
|
||||
|
||||
def _read_dpi_from_exif(self) -> None:
|
||||
|
@ -504,7 +504,7 @@ class JpegImageFile(ImageFile.ImageFile):
|
|||
return _getmp(self)
|
||||
|
||||
|
||||
def _getexif(self: JpegImageFile) -> dict[str, Any] | None:
|
||||
def _getexif(self: JpegImageFile) -> dict[int, Any] | None:
|
||||
if "exif" not in self.info:
|
||||
return None
|
||||
return self.getexif()._get_merged_dict()
|
||||
|
|
|
@ -1054,7 +1054,7 @@ class PngImageFile(ImageFile.ImageFile):
|
|||
self._prev_im.paste(updated, self.dispose_extent, mask)
|
||||
self.im = self._prev_im
|
||||
|
||||
def _getexif(self) -> dict[str, Any] | None:
|
||||
def _getexif(self) -> dict[int, Any] | None:
|
||||
if "exif" not in self.info:
|
||||
self.load()
|
||||
if "exif" not in self.info and "Raw profile type exif" not in self.info:
|
||||
|
|
|
@ -96,7 +96,7 @@ class WebPImageFile(ImageFile.ImageFile):
|
|||
# Initialize seek state
|
||||
self._reset(reset=False)
|
||||
|
||||
def _getexif(self) -> dict[str, Any] | None:
|
||||
def _getexif(self) -> dict[int, Any] | None:
|
||||
if "exif" not in self.info:
|
||||
return None
|
||||
return self.getexif()._get_merged_dict()
|
||||
|
|
Loading…
Reference in New Issue
Block a user