summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
41f4ec8)
I really should integrate flake8 more decisively into my workflow somehow.
Note: I'm ignoring W503 here since it's contradictory with W504,
(breaking a "line too long" problem at an operator will cause
one of W503 or W504 to fire and there's no way I can see to shut
them both up).
-ignore = E251, E305, E302
+ignore = E251, E305, E302, W503
from flask import current_app
from slack import WebClient
from flask import current_app
from slack import WebClient
-from slack.errors import SlackApiError
from slack.signature import SignatureVerifier
import os
import requests
from slack.signature import SignatureVerifier
import os
import requests
"""Send a Slack message to a specified channel."""
slack_client.chat_postMessage(channel=channel, text=text)
"""Send a Slack message to a specified channel."""
slack_client.chat_postMessage(channel=channel, text=text)
return {
"type": "home",
"blocks": [
return {
"type": "home",
"blocks": [
- section(text("This is (or soon will be) a list of available puzzle hunts)")),
+ section(text("This is (or soon will be) a list of "
+ + "available puzzle hunts)")),
actions(button("New hunt", "new_hunt"))
]
}
actions(button("New hunt", "new_hunt"))
]
}
-from flask import Flask, request
+from flask import Flask, request, make_response
from slackeventsapi import SlackEventAdapter
from turbot.slack import slack_is_valid_request, slack_send_reply
import os
from slackeventsapi import SlackEventAdapter
from turbot.slack import slack_is_valid_request, slack_send_reply
import os
This implements the Slack signature verification using the slack
signing secret (obtained via an SSM parameter in code above)."""
This implements the Slack signature verification using the slack
signing secret (obtained via an SSM parameter in code above)."""
- content = "v0:{}:{}".format(timestamp,body).encode('utf-8')
+ content = "v0:{}:{}".format(timestamp, body).encode('utf-8')
signature = 'v0=' + hmac.new(slack_signing_secret,
content,
signature = 'v0=' + hmac.new(slack_signing_secret,
content,