1- import os
21import re
32from configparser import ConfigParser
43from logging import Logger
@@ -152,7 +151,7 @@ def _convert_story_tags(self, old_story):
152151 def _convert_tags_join (self , new_story , tags , sql = None ):
153152 # Support using non-default sql connection for multithreaded workloads
154153 sql = self .sql if sql is None else sql
155- full_query = f "INSERT INTO item_tags (item_id, item_type, tag_id) VALUES "
154+ full_query = "INSERT INTO item_tags (item_id, item_type, tag_id) VALUES "
156155 tag_query = []
157156 for tag_list in tags .values ():
158157 for tag in tag_list :
@@ -176,7 +175,7 @@ def fetch_coauthors(self, new_story, sql=None):
176175 # get a dict of coauthor IDs for the story
177176 try :
178177 authors = sql .execute_and_fetchall (self .working_original , full_query )
179- except Exception as e :
178+ except Exception :
180179 authors = None
181180 self .logger .info ("No coauthors table..." )
182181 # We only try to operate on this result if it is not None
@@ -219,12 +218,12 @@ def story_processor(old_story):
219218 """
220219 sql .execute (self .working_open_doors , query )
221220
222- self .logger .debug (f " tags..." )
221+ self .logger .debug (" tags..." )
223222 tags = self ._convert_story_tags (old_story )
224223 # pass the new sql to be used instead of the main one
225224 self ._convert_tags_join (new_story , tags , sql )
226225
227- self .logger .debug (f " authors..." )
226+ self .logger .debug (" authors..." )
228227 self ._convert_author_join (new_story , old_story ['uid' ], sql )
229228 # Find if there are any coauthors for the work
230229 coauthors = self .fetch_coauthors (new_story , sql )
0 commit comments