mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-12 01:20:53 +03:00
Keep ImageFile type hint
This commit is contained in:
parent
5620b9e6ec
commit
ffc6939d16
|
@ -28,7 +28,7 @@ def test_getiptcinfo_jpg_none() -> None:
|
||||||
# Arrange
|
# Arrange
|
||||||
with hopper() as im:
|
with hopper() as im:
|
||||||
# Act
|
# Act
|
||||||
iptc = IptcImagePlugin.getiptcinfo(im)
|
iptc = IptcImagePlugin.getiptcinfo(im) # type: ignore[arg-type]
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
assert iptc is None
|
assert iptc is None
|
||||||
|
|
|
@ -192,7 +192,7 @@ Image.register_extension(IptcImageFile.format, ".iim")
|
||||||
|
|
||||||
|
|
||||||
def getiptcinfo(
|
def getiptcinfo(
|
||||||
im: Image.Image,
|
im: ImageFile.ImageFile,
|
||||||
) -> dict[tuple[int, int], bytes | list[bytes]] | None:
|
) -> dict[tuple[int, int], bytes | list[bytes]] | None:
|
||||||
"""
|
"""
|
||||||
Get IPTC information from TIFF, JPEG, or IPTC file.
|
Get IPTC information from TIFF, JPEG, or IPTC file.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user