Skip to content

Commit 4c5e2e4

Browse files
authored
Merge pull request #7720 from radarhere/type_hints_imt
2 parents ab1de6d + 4a6cb0f commit 4c5e2e4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/PIL/ImtImagePlugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ class ImtImageFile(ImageFile.ImageFile):
3333
format = "IMT"
3434
format_description = "IM Tools"
3535

36-
def _open(self):
36+
def _open(self) -> None:
3737
# Quick rejection: if there's not a LF among the first
3838
# 100 bytes, this is (probably) not a text header.
3939

40+
assert self.fp is not None
41+
4042
buffer = self.fp.read(100)
4143
if b"\n" not in buffer:
4244
msg = "not an IM file"

0 commit comments

Comments
 (0)