From 025e9cfae68bb65adb9867fd0276c394f5401097 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Sat, 14 Jun 2025 08:48:22 -0700 Subject: [PATCH] Add type annotations to set_module_args (#85329) --- test/units/modules/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/units/modules/conftest.py b/test/units/modules/conftest.py index 45d1c5d7f2c..09725f74a75 100644 --- a/test/units/modules/conftest.py +++ b/test/units/modules/conftest.py @@ -15,16 +15,16 @@ assert module_env_mocker is not None # avoid unused imports @pytest.fixture -def set_module_args(): +def set_module_args() -> t.Iterator[t.Callable[[dict[str, t.Any] | None], None]]: ctx: t.ContextManager | None = None - def set_module_args(args): + def set_module_args(args: dict[str, t.Any] | None = None) -> None: nonlocal ctx args['_ansible_remote_tmp'] = '/tmp' args['_ansible_keep_remote_files'] = False - ctx = patch_module_args(args) + ctx = t.cast(t.ContextManager, patch_module_args(args)) ctx.__enter__() try: