]> git.cworth.org Git - turbot/blobdiff - turbot/sheets.py
Add display of round(s) in /puzzle output
[turbot] / turbot / sheets.py
index 921b51a24d339cab67e212ca8e8cb704cc4a74c3..bc7c7c68ceb777a2e0cd86b366264ae1e47da3ae 100644 (file)
@@ -61,7 +61,10 @@ def sheets_create_for_puzzle(turb, puzzle):
         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
@@ -89,7 +92,7 @@ def renameSheet(turb, url, newName):
             },
             'fields': 'title'
         }
-    }
+    })
 
     body = {
         'requests': requests
@@ -100,8 +103,8 @@ def renameSheet(turb, url, newName):
                             ).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