Add type annotations to set_module_args (#85329)

pull/85330/head
Matt Clay 6 months ago committed by GitHub
parent ed90a424a9
commit 025e9cfae6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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:

Loading…
Cancel
Save