[flake8]
-ignore = E251, E305, E302, W503, E201, E202
+ignore = E251, E305, E302, W503, E201, E202, E225, E226, E203
$(error "No virtualenv active. Try '. ./env/bin/activate'")
endif
+.PHONY: flake
+flake:
+ flake8 --exclude=env,.deploy*
+
.PHONY: bootstrap
bootstrap:
@echo "=== Creating python virtual environment ==="
set_channel_topic(turb, puzzle)
# And rename the sheet to prefix with "SOLVED: "
- turbot.sheets.renameSheet(turb, puzzle['sheet_url'], 'SOLVED: ' + puzzle['name'])
+ turbot.sheets.renameSheet(turb, puzzle['sheet_url'],
+ 'SOLVED: ' + puzzle['name'])
# Finally, rename the Slack channel to add the suffix '-solved'
channel_name = "{}-{}-solved".format(
insertDataOption='INSERT_ROWS',
body={
'range': 'A1:A2',
- 'values': [['=HYPERLINK("'+url_link+'","'+url_text+'")'], ['=HYPERLINK("'+channel_url_link+'","'+channel_url_text+'")']]
+ 'values': [
+ ['=HYPERLINK("'+url_link+'","'+url_text+'")'],
+ ['=HYPERLINK("'+channel_url_link+'","'+channel_url_text+'")']
+ ]
}).execute()
# Copy some sheets from the Template spreadsheet
).execute()
def extractIdFromSheetUrl(url):
- # Google sheet ids are between the /d/ and /edit in the url, like https://docs.google.com/spreadsheets/d/1dxHBzjenjhCAJQ8lM0skJO2mxlup8aWZm0-LaXeVPrg/edit#gid=0
+ # Google sheet ids are between the /d/ and /edit in the url, like
+ # https://docs.google.com/spreadsheets/d/1dxHBzjen...-LaXeVPrg/edit#gid=0
startIndex = url.find('/d/') + 3
endIndex = url.find('/edit')
return url[startIndex : endIndex]
-
\ No newline at end of file