Skip to content

Commit

Permalink
Keep ImageFile type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 31, 2024
1 parent e461115 commit bbbbf8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/test_file_iptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_getiptcinfo_jpg_none() -> None:
# Arrange
with hopper() as im:
# Act
iptc = IptcImagePlugin.getiptcinfo(im)
iptc = IptcImagePlugin.getiptcinfo(im) # type: ignore[arg-type]

# Assert
assert iptc is None
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/IptcImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def load(self) -> Image.core.PixelAccess | None:


def getiptcinfo(
im: Image.Image,
im: ImageFile.ImageFile,
) -> dict[tuple[int, int], bytes | list[bytes]] | None:
"""
Get IPTC information from TIFF, JPEG, or IPTC file.
Expand Down

0 comments on commit bbbbf8f

Please sign in to comment.