diff --git a/stego_lsb/LSBSteg.py b/stego_lsb/LSBSteg.py index 0c79920..1f3528e 100755 --- a/stego_lsb/LSBSteg.py +++ b/stego_lsb/LSBSteg.py @@ -93,8 +93,8 @@ def hide_message_in_image(input_image: Image.Image, message: Union[str, bytes], log.debug(f"{f'{message_size} bytes hidden':<30} in {time() - start:.2f}s") start = time() - # PIL expects a sequence of tuples, one per pixel TODO: this expression is too complicated for typing to handle? - input_image.putdata(cast(List[int], list(zip(*[iter(flattened_color_data)] * num_channels)))) # type: ignore + # PIL expects a sequence of tuples, one per pixel + input_image.putdata(cast(List[int], list(zip(*[iter(flattened_color_data)] * num_channels)))) log.debug(f"{'Image overwritten':<30} in {time() - start:.2f}s") return input_image diff --git a/tests/test_lsbsteg.py b/tests/test_lsbsteg.py index 04eb404..395ed06 100644 --- a/tests/test_lsbsteg.py +++ b/tests/test_lsbsteg.py @@ -14,8 +14,7 @@ class TestLSBSteg(unittest.TestCase): def write_random_image(self, filename: str, width: int, height: int, num_channels: int) -> None: image_data = np.random.randint(0, 256, size=(height, width, num_channels), dtype=np.uint8) - # TODO: Image.fromarray() appears to have buggy typing? - with Image.fromarray(image_data) as image: # type: ignore + with Image.fromarray(image_data) as image: image.save(filename) def write_random_file(self, filename: str, num_bytes: int) -> None: