1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-09 21:47:17 +00:00

Add more type hints.

This commit is contained in:
Felix Fontein 2025-11-30 12:00:56 +01:00
parent fe478bd1bb
commit 93cd3755a0
30 changed files with 354 additions and 298 deletions

View file

@ -52,7 +52,7 @@ def snap_runner(module: AnsibleModule, **kwargs) -> CmdRunner:
return runner
def get_version(runner: CmdRunner):
def get_version(runner: CmdRunner) -> dict[str, list[str]]:
with runner("version") as ctx:
rc, out, err = ctx.run()
return dict(x.split() for x in out.splitlines() if len(x.split()) == 2)