]> git.cworth.org Git - turbot/commitdiff
Some style fixes pointed out by flake8
authorCarl Worth <cworth@cworth.org>
Mon, 19 Oct 2020 22:12:27 +0000 (15:12 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 19 Oct 2020 23:20:05 +0000 (16:20 -0700)
Just to keep things clean so that flake8 can point out useful problems
like in the previous commit. No functional changes here.

.flake8
turbot/actions.py
turbot/events.py
turbot_lambda/turbot_lambda.py

diff --git a/.flake8 b/.flake8
index 677e0cd9f90cd3ee6aff5be4f999b7b29ba8b810..f9291543cd5a0ff2b109ad19b7130770b0fc86f1 100644 (file)
--- a/.flake8
+++ b/.flake8
@@ -1,2 +1,2 @@
 [flake8]
-ignore = E251, E305, E302, W503
+ignore = E251, E305, E302, W503, E201, E202
index b586d39048dab8942429d79bf3e5a6035b034f5c..860ea462f1d3b8040e736e6151da820088a8032b 100644 (file)
@@ -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")
index 78fc560e8c238e72fe70f6bceb3e0efae2d0286a..8cb6d1e061c673d491f44ca19963f0c9f7c4b1cd 100644 (file)
@@ -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']
index ab670d34c74c60476c90036fd0629834beb96703..80cc4d27a26bee30c7a8fbde7c90ecb80b88f541 100644 (file)
@@ -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',