mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +03:00
Added return types
This commit is contained in:
parent
aa0f4127b8
commit
8d78cfcc5a
|
@ -181,7 +181,7 @@ class TestFileJpeg:
|
||||||
assert test(100, 200) == (100, 200)
|
assert test(100, 200) == (100, 200)
|
||||||
assert test(0) is None # square pixels
|
assert test(0) is None # square pixels
|
||||||
|
|
||||||
def test_dpi_jfif_cm(self):
|
def test_dpi_jfif_cm(self) -> None:
|
||||||
with Image.open("Tests/images/jfif_unit_cm.jpg") as im:
|
with Image.open("Tests/images/jfif_unit_cm.jpg") as im:
|
||||||
assert im.info["dpi"] == (2.54, 5.08)
|
assert im.info["dpi"] == (2.54, 5.08)
|
||||||
|
|
||||||
|
|
|
@ -949,7 +949,7 @@ class ImageFileDirectory_v2(_IFDv2Base):
|
||||||
warnings.warn(str(msg))
|
warnings.warn(str(msg))
|
||||||
return
|
return
|
||||||
|
|
||||||
def _get_ifh(self):
|
def _get_ifh(self) -> bytes:
|
||||||
ifh = self._prefix + self._pack("H", 43 if self._bigtiff else 42)
|
ifh = self._prefix + self._pack("H", 43 if self._bigtiff else 42)
|
||||||
if self._bigtiff:
|
if self._bigtiff:
|
||||||
ifh += self._pack("HH", 8, 0)
|
ifh += self._pack("HH", 8, 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user