From dc7b8e70507212f1205fd1358eed3039a45b4427 Mon Sep 17 00:00:00 2001 From: Jonathon Reinhart Date: Mon, 25 Mar 2024 00:37:25 -0400 Subject: [PATCH] tests: Ignore untyped mock.patch(side_effect=) functions These are just not worth the effort to properly annotate! --- tests/test_dockerutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_dockerutil.py b/tests/test_dockerutil.py index 81545f0..2dac1e1 100644 --- a/tests/test_dockerutil.py +++ b/tests/test_dockerutil.py @@ -23,7 +23,7 @@ def test_get_image_command_bad_image() -> None: def test_get_image_no_docker() -> None: """get_image_command raises an exception if docker is not installed""" - def mocked_run(args, real_run=subprocess.run, **kw): + def mocked_run(args, real_run=subprocess.run, **kw): # type: ignore[no-untyped-def] assert args[0] == "docker" args[0] = "dockerZZZZ" return real_run(args, **kw) @@ -34,7 +34,7 @@ def mocked_run(args, real_run=subprocess.run, **kw): def _test_get_images(stdout: str, returncode: int = 0) -> Sequence[str]: - def mocked_run(*args, **kwargs): + def mocked_run(*args, **kwargs): # type: ignore[no-untyped-def] mock_obj = mock.MagicMock() mock_obj.returncode = returncode mock_obj.stdout = stdout