diff --git a/plugins/module_utils/module.py b/plugins/module_utils/module.py index 1b84b31..801f9f0 100644 --- a/plugins/module_utils/module.py +++ b/plugins/module_utils/module.py @@ -57,14 +57,24 @@ class AnsibleModule(object): def diff(self, diff: Dict[str, str]): pass + @overload def diff( self, - diff: Optional[Dict[str, str]] = None, - *, before: Optional[str] = None, after: Optional[str] = None, before_header: Optional[str] = None, after_header: Optional[str] = None, + ): + pass + + def diff( # type: ignore + self, + diff=None, + *, + before=None, + after=None, + before_header=None, + after_header=None, ): """adds the special return value "diff". This allows Modules to present the changes of files to the caller. it takes care of the special semantics of the return value""" if "diff" not in self.result: