lint: Clean up E123 PEP-8 rule.

This commit is contained in:
Tim Abbott 2017-01-23 21:34:26 -08:00
parent 5b3d2c9100
commit 55e8d5f58d
9 changed files with 13 additions and 13 deletions

View file

@ -90,7 +90,7 @@ if options.sharded:
("tabbott-nagios-test-12", "d"), ("tabbott-nagios-test-12", "d"),
("tabbott-nagios-test-11", "e"), ("tabbott-nagios-test-11", "e"),
("tabbott-nagios-test-9", "f"), ("tabbott-nagios-test-9", "f"),
] ]
for (stream, test) in test_streams: for (stream, test) in test_streams:
if stream == "message": if stream == "message":
continue continue
@ -99,7 +99,7 @@ else:
test_streams = [ test_streams = [
("message", "p"), ("message", "p"),
("tabbott-nagios-test", "a"), ("tabbott-nagios-test", "a"),
] ]
def print_status_and_exit(status): def print_status_and_exit(status):
# type: (int) -> None # type: (int) -> None
@ -262,7 +262,7 @@ for key, (stream, test) in hzkeys.items():
"subject": "test", "subject": "test",
"content": str(key), "content": str(key),
"to": stream, "to": stream,
}) })
receive_zephyrs() receive_zephyrs()
logger.info("Sent Zulip messages!") logger.info("Sent Zulip messages!")

View file

@ -69,7 +69,7 @@ class IRCBot(irc.bot.SingleServerIRCBot):
"type": "private", "type": "private",
"to": "username@example.com", "to": "username@example.com",
"content": content, "content": content,
})) }))
def on_pubmsg(self, c, e): def on_pubmsg(self, c, e):
# type: (ServerConnection, Event) -> None # type: (ServerConnection, Event) -> None
@ -87,7 +87,7 @@ class IRCBot(irc.bot.SingleServerIRCBot):
"to": stream, "to": stream,
"subject": "IRC", "subject": "IRC",
"content": content, "content": content,
})) }))
def on_dccmsg(self, c, e): def on_dccmsg(self, c, e):
# type: (ServerConnection, Event) -> None # type: (ServerConnection, Event) -> None

View file

@ -171,7 +171,7 @@ class JabberToZulipBot(ClientXMPP):
type = "private", type = "private",
to = recipient, to = recipient,
content = msg["body"], content = msg["body"],
) )
ret = self.zulipToJabber.client.send_message(zulip_message) ret = self.zulipToJabber.client.send_message(zulip_message)
if ret.get("result") != "success": if ret.get("result") != "success":
logging.error(str(ret)) logging.error(str(ret))
@ -199,7 +199,7 @@ class JabberToZulipBot(ClientXMPP):
subject = subject, subject = subject,
to = stream, to = stream,
content = msg["body"], content = msg["body"],
) )
ret = self.zulipToJabber.client.send_message(zulip_message) ret = self.zulipToJabber.client.send_message(zulip_message)
if ret.get("result") != "success": if ret.get("result") != "success":
logging.error(str(ret)) logging.error(str(ret))

View file

@ -45,7 +45,7 @@ def send_log_zulip(file_name, count, lines, extra=""):
"to": "logs", "to": "logs",
"subject": "%s on %s" % (file_name, platform.node()), "subject": "%s on %s" % (file_name, platform.node()),
"content": content, "content": content,
}) })
def process_lines(raw_lines, file_name): def process_lines(raw_lines, file_name):
# type: (List[str], str) -> None # type: (List[str], str) -> None

View file

@ -85,7 +85,7 @@ def run_message_handler_for_bot(lib_module, quiet, config_file):
message=message, message=message,
client=restricted_client, client=restricted_client,
state_handler=state_handler state_handler=state_handler
) )
signal.signal(signal.SIGINT, exit_gracefully) signal.signal(signal.SIGINT, exit_gracefully)

View file

@ -80,7 +80,7 @@ Example Inputs:
subject=message['subject'], subject=message['subject'],
to=message['display_recipient'], to=message['display_recipient'],
content=letter, content=letter,
)) ))
def handle_message(self, message, client, state_handler): def handle_message(self, message, client, state_handler):
words = message['content'].split() words = message['content'].split()

View file

@ -52,4 +52,4 @@ print(client.create_user({
'password': options.new_password, 'password': options.new_password,
'full_name': options.new_full_name, 'full_name': options.new_full_name,
'short_name': options.new_short_name 'short_name': options.new_short_name
})) }))

View file

@ -80,7 +80,7 @@ def send_update(ticket, content):
"to": config.STREAM_FOR_NOTIFICATIONS, "to": config.STREAM_FOR_NOTIFICATIONS,
"content": content, "content": content,
"subject": trac_subject(ticket) "subject": trac_subject(ticket)
}) })
class ZulipPlugin(Component): class ZulipPlugin(Component):
implements(ITicketChangeListener) implements(ITicketChangeListener)

View file

@ -288,7 +288,7 @@ class Client(object):
client_name=self.client_name, client_name=self.client_name,
vendor=vendor, vendor=vendor,
vendor_version=vendor_version, vendor_version=vendor_version,
) )
def do_api_query(self, orig_request, url, method="POST", longpolling=False, files=None): def do_api_query(self, orig_request, url, method="POST", longpolling=False, files=None):
# type: (Mapping[str, Any], str, str, bool, List[IO]) -> Dict[str, Any] # type: (Mapping[str, Any], str, str, bool, List[IO]) -> Dict[str, Any]