Skip to content

Commit b4fdfc9

Browse files
committed
Added type hints
1 parent e0a5d81 commit b4fdfc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/test_file_tiff.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -874,16 +874,16 @@ def test_oom(self, test_file: str) -> None:
874874
with Image.open(test_file):
875875
pass
876876

877-
def test_open_tiff_uint16_multiband(self):
877+
def test_open_tiff_uint16_multiband(self) -> None:
878878
"""Test opening multiband TIFFs and reading all channels."""
879879

880-
def check_pixel(im: Image.Image, expected_pixel, pos: tuple[int, int]):
880+
def check_pixel(im: Image.Image, expected_pixel: tuple[int, ...], pos: tuple[int, int]) -> None:
881881
actual_pixel = im.getpixel((0, 0))
882882
if isinstance(actual_pixel, int):
883883
actual_pixel = (actual_pixel,)
884884
assert actual_pixel == expected_pixel
885885

886-
def check_image(im: Image.Image, width: int, height: int, expected_pixel):
886+
def check_image(im: Image.Image, width: int, height: int, expected_pixel: tuple[int, ...]) -> None:
887887
assert im.width == width
888888
assert im.height == height
889889
for x in range(im.width):
@@ -892,7 +892,7 @@ def check_image(im: Image.Image, width: int, height: int, expected_pixel):
892892

893893
base_value = 4660
894894
for i in range(1, 6):
895-
pixel = tuple([base_value + j for j in range(0, i)])
895+
pixel = tuple(base_value + j for j in range(i))
896896
infile = f"Tests/images/uint16_{i}_{base_value}.tif"
897897
im = Image.open(infile)
898898

0 commit comments

Comments
 (0)