E501 fixes (#22879)

This commit is contained in:
Matt Martz
2017-03-22 20:50:28 -05:00
committed by GitHub
parent 4fdeade389
commit 3164e8b561
215 changed files with 1328 additions and 761 deletions

View File

@@ -46,7 +46,9 @@ options:
required: true
picture:
description:
- "The full URL to the image you wish to use for the Icon of the message. Defaults to U(http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627)"
- >
The full URL to the image you wish to use for the Icon of the message. Defaults to
U(http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627)
required: false
"""
@@ -62,7 +64,7 @@ EXAMPLES = """
hall:
room_token: <hall room integration token>
title: Server Creation
msg: 'Created EC2 instance {{ item.id }} of type {{ item.instance_type }}.\\nInstance can be reached at {{ item.public_ip }} in the {{ item.region }} region.'
msg: 'Created instance {{ item.id }} of type {{ item.instance_type }}.\\nInstance can be reached at {{ item.public_ip }} in the {{ item.region }} region.'
delegate_to: loclahost
when: ec2.instances|length > 0
with_items: '{{ ec2.instances }}'
@@ -81,11 +83,12 @@ def send_request_to_hall(module, room_token, payload):
def main():
module = AnsibleModule(
argument_spec = dict(
room_token = dict(type='str', required=True),
msg = dict(type='str', required=True),
title = dict(type='str', required=True),
picture = dict(type='str', default='http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627'),
argument_spec=dict(
room_token=dict(type='str', required=True),
msg=dict(type='str', required=True),
title=dict(type='str', required=True),
picture=dict(type='str',
default='http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627'),
)
)

View File

@@ -254,7 +254,8 @@ def main():
sendgrid_lib_args = [api_key, bcc, cc, headers, from_name, html_body, attachments]
if any(lib_arg is not None for lib_arg in sendgrid_lib_args) and not HAS_SENDGRID:
module.fail_json(msg='You must install the sendgrid python library if you want to use any of the following arguments: api_key, bcc, cc, headers, from_name, html_body, attachments')
module.fail_json(msg='You must install the sendgrid python library if you want to use any of the following arguments: '
'api_key, bcc, cc, headers, from_name, html_body, attachments')
response, info = post_sendgrid_api(module, username, password,
from_address, to_addresses, subject, body, attachments=attachments,

View File

@@ -203,7 +203,8 @@ def main():
if not message_structure=='string' and message_attributes:
module.fail_json(msg="when specifying message_attributes, the message_structure must be set to 'string'; otherwise the attributes will not be sent.")
elif message_structure=='string' and (email or sqs or sms or http or https):
module.fail_json(msg="do not specify non-default message formats when using the 'string' message_structure. they can only be used with the 'json' message_structure.")
module.fail_json(msg="do not specify non-default message formats when using the 'string' message_structure. they can only be used with "
"the 'json' message_structure.")
# .publish() takes full ARN topic id, but I'm lazy and type shortnames
# so do a lookup (topics cannot contain ':', so thats the decider)