1
0
Fork 0

moved type definitons completly to overloaded methods

Dieser Commit ist enthalten in:
Sebastian Tobie 2023-04-23 09:15:37 +02:00
Ursprung e4f25c2ffa
Commit 1884f4045e
1 geänderte Dateien mit 12 neuen und 2 gelöschten Zeilen

Datei anzeigen

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