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

Add basic typing for module_utils.

This commit is contained in:
Felix Fontein 2025-11-26 22:37:16 +01:00
parent fb2f34ba85
commit e74033eac1
48 changed files with 209 additions and 142 deletions

View file

@ -4,6 +4,8 @@
from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils import deps
@ -13,7 +15,7 @@ with deps.declare("packaging"):
class PackageRequirement:
def __init__(self, module, name):
def __init__(self, module: AnsibleModule, name) -> None:
self.module = module
self.parsed_name, self.requirement = self._parse_spec(name)