mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Bulk autopep8 (modules)
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues Generated using: autopep8 1.3.3 (pycodestyle: 2.3.1) autopep8 -r --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules Manually fix issues that autopep8 has introduced
This commit is contained in:
committed by
John R Barker
parent
d13d7e9404
commit
c57a7f05e1
@@ -115,7 +115,7 @@ def main():
|
||||
argument_spec=dict(
|
||||
token=dict(required=True, no_log=True),
|
||||
msg=dict(required=True),
|
||||
type=dict(required=True, choices=["inbox","chat"]),
|
||||
type=dict(required=True, choices=["inbox", "chat"]),
|
||||
external_user_name=dict(required=False),
|
||||
from_address=dict(required=False),
|
||||
source=dict(required=False),
|
||||
@@ -125,7 +125,7 @@ def main():
|
||||
project=dict(required=False),
|
||||
tags=dict(required=False),
|
||||
link=dict(required=False),
|
||||
validate_certs = dict(default='yes', type='bool'),
|
||||
validate_certs=dict(default='yes', type='bool'),
|
||||
),
|
||||
supports_check_mode=True
|
||||
)
|
||||
@@ -152,7 +152,7 @@ def main():
|
||||
module.fail_json(msg="external_user_name is required for the 'chat' type")
|
||||
|
||||
# required params for the 'inbox' type
|
||||
for item in [ 'from_address', 'source', 'subject' ]:
|
||||
for item in ['from_address', 'source', 'subject']:
|
||||
if module.params[item]:
|
||||
if type == 'chat':
|
||||
module.fail_json(msg="%s is not valid for the 'chat' type" % item)
|
||||
@@ -166,7 +166,7 @@ def main():
|
||||
params['tags'] = module.params["tags"]
|
||||
|
||||
# optional params for the 'inbox' type
|
||||
for item in [ 'from_name', 'reply_to', 'project', 'link' ]:
|
||||
for item in ['from_name', 'reply_to', 'project', 'link']:
|
||||
if module.params[item]:
|
||||
if type == 'chat':
|
||||
module.fail_json(msg="%s is not valid for the 'chat' type" % item)
|
||||
|
||||
Reference in New Issue
Block a user