moved type definitons completly to overloaded methods
Dieser Commit ist enthalten in:
Ursprung
e4f25c2ffa
Commit
1884f4045e
|
@ -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:
|
||||
|
|
Laden…
In neuem Issue referenzieren