mirror of
https://github.com/zebrajr/ansible.git
synced 2025-12-06 00:19:48 +01:00
Add type annotations to set_module_args (#85329)
This commit is contained in:
parent
ed90a424a9
commit
025e9cfae6
|
|
@ -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…
Reference in New Issue
Block a user