8000 Keep ImageFile type hint · python-pillow/Pillow@bbbbf8f · GitHub
[go: up one dir, main page]

Skip to content

Commit bbbbf8f

Browse files
committed
Keep ImageFile type hint
1 parent e461115 commit bbbbf8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tests/test_file_iptc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_getiptcinfo_jpg_none() -> None:
2828
# Arrange
2929
with hopper() as im:
3030
# Act
31-
iptc = IptcImagePlugin.getiptcinfo(im)
31+
iptc = IptcImagePlugin.getiptcinfo(im) # type: ignore[arg-type]
3232

3333
# Assert
3434
assert iptc is None

src/PIL/IptcImagePlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def load(self) -> Image.core.PixelAccess | None:
192192

193193

194194
def getiptcinfo(
195-
im: Image.Image,
195+
im: ImageFile.ImageFile,
196196
) -> dict[tuple[int, int], bytes | list[bytes]] | None:
197197
"""
198198
Get IPTC information from TIFF, JPEG, or IPTC file.

0 commit comments

Comments
 (0)
0