From: Carl Worth Date: Mon, 19 Oct 2020 22:12:27 +0000 (-0700) Subject: Some style fixes pointed out by flake8 X-Git-Url: https://git.cworth.org/git?p=turbot;a=commitdiff_plain;h=36ceab157e8c871e20bd93387f03c63781bf5ff4 Some style fixes pointed out by flake8 Just to keep things clean so that flake8 can point out useful problems like in the previous commit. No functional changes here. --- diff --git a/.flake8 b/.flake8 index 677e0cd..f929154 100644 --- a/.flake8 +++ b/.flake8 @@ -1,2 +1,2 @@ [flake8] -ignore = E251, E305, E302, W503 +ignore = E251, E305, E302, W503, E201, E202 diff --git a/turbot/actions.py b/turbot/actions.py index b586d39..860ea46 100644 --- a/turbot/actions.py +++ b/turbot/actions.py @@ -1,5 +1,4 @@ from turbot.blocks import input_block -import uuid import turbot.sheets def new_hunt(turb, payload): @@ -12,7 +11,7 @@ def new_hunt(turb, payload): "submit": { "type": "plain_text", "text": "Create" }, "blocks": [ input_block("Hunt name", "name", "Name of the hunt"), - input_block("Hunt ID", "slug", "Short prefix for hunt (no spaces)"), + input_block("Hunt ID", "slug", "Short hunt prefix (no spaces)"), input_block("Hunt URL", "url", "External URL of hunt") ], } @@ -52,7 +51,7 @@ def new_hunt_submission(turb, payload): channel_id = response['channel']['id'] # Create a sheet for the channel - sheet = turbot.sheets.sheets_create(turb, slug) + turbot.sheets.sheets_create(turb, slug) # Insert the newly-created hunt into the database turb.hunts_table = turb.db.Table("hunts") diff --git a/turbot/events.py b/turbot/events.py index 78fc560..8cb6d1e 100644 --- a/turbot/events.py +++ b/turbot/events.py @@ -1,4 +1,6 @@ -from turbot.blocks import section_block, text_block, button_block, actions_block +from turbot.blocks import ( + section_block, text_block, button_block, actions_block +) def hunt_block(hunt): name = hunt['name'] diff --git a/turbot_lambda/turbot_lambda.py b/turbot_lambda/turbot_lambda.py index ab670d3..80cc4d2 100644 --- a/turbot_lambda/turbot_lambda.py +++ b/turbot_lambda/turbot_lambda.py @@ -41,7 +41,7 @@ if gsheets_creds: print("Storing refreshed GSheets credentials into SSM") ssm.put_parameter(Name='GSHEETS_PICKLE_BASE64', Type='SecureString', - Value=gsheets_pickle_base64, + Value=str(gsheets_pickle_base64), Overwrite=True) service = build('sheets', 'v4',