fix: [mypy] Addressed mypy errors.

This commit is contained in:
Cédric Bonhomme 2022-11-20 00:15:25 +01:00
parent bee5f819d9
commit 2e4f1629fd
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
2 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ from stegano import tools
def hide( def hide(
image: Union[str, IO[bytes]], image: Union[str, IO[bytes]],
message: str, message: str,
generator: Iterator[int] = None, generator: Union[None, Iterator[int]] = None,
shift: int = 0, shift: int = 0,
encoding: str = "UTF-8", encoding: str = "UTF-8",
auto_convert_rgb: bool = False, auto_convert_rgb: bool = False,
@ -65,7 +65,7 @@ def hide(
def reveal( def reveal(
encoded_image: Union[str, IO[bytes]], encoded_image: Union[str, IO[bytes]],
generator: Iterator[int] = None, generator: Union[None, Iterator[int]] = None,
shift: int = 0, shift: int = 0,
encoding: str = "UTF-8", encoding: str = "UTF-8",
): ):

View file

@ -229,7 +229,7 @@ class TestLSB(unittest.TestCase):
lsb.hide( lsb.hide(
"./tests/sample-files/Lenna.png", "./tests/sample-files/Lenna.png",
message_to_hide, message_to_hide,
generators.unknown_generator(), generators.unknown_generator(), # type: ignore
) )
def tearDown(self): def tearDown(self):