diff --git a/efiction/metadata.py b/efiction/metadata.py index 58ccdbd..ae277d3 100644 --- a/efiction/metadata.py +++ b/efiction/metadata.py @@ -175,7 +175,7 @@ def fetch_coauthors(self, new_story, sql=None): # get a dict of coauthor IDs for the story try: authors = sql.execute_and_fetchall(self.working_original, full_query) - except Exception as e: + except Exception: authors = None self.logger.info("No coauthors table...") # We only try to operate on this result if it is not None diff --git a/efiction/tag_converter.py b/efiction/tag_converter.py index 593e478..e328ce8 100644 --- a/efiction/tag_converter.py +++ b/efiction/tag_converter.py @@ -53,7 +53,7 @@ def check_for_nonstandard_tag_tables(self) -> bool: tags = list(map(lambda story_tags: story_tags[id_name].replace(',', ''), tags)) int(''.join(tags)) tag_tables[tag_table_name] = False - except Exception as e: + except Exception: # Non-integer in identifier tag_tables[tag_table_name] = True except Exception as e: diff --git a/opendoors/mysql.py b/opendoors/mysql.py index 193ef99..ed67c1c 100644 --- a/opendoors/mysql.py +++ b/opendoors/mysql.py @@ -73,7 +73,7 @@ def read_table_to_dict(self, database: str, tablename: str): try: cursor.execute(f"SELECT * FROM {database}.{tablename};") return cursor.fetchall() - except Exception as e: + except Exception: self.logger.info(f"No table {tablename} in {database}...") return [] diff --git a/opendoors/progress.py b/opendoors/progress.py index c6a5f15..15daa08 100644 --- a/opendoors/progress.py +++ b/opendoors/progress.py @@ -36,7 +36,7 @@ def continue_from_last(config: ConfigParser, logger: Logger, sql: SqlDb, steps: next_step = "01" else: run_next = False - except Exception as e: + except Exception: logger.error(traceback.format_exc()) diff --git a/opendoors/utils.py b/opendoors/utils.py index d569fe6..a950f1c 100644 --- a/opendoors/utils.py +++ b/opendoors/utils.py @@ -135,7 +135,7 @@ def remove_output_files(path: str): shutil.rmtree(file) else: os.remove(file) - except PermissionError as pe: + except PermissionError: # We don't necessarily care that much continue diff --git a/steps/tests/test_step_01.py b/steps/tests/test_step_01.py index b59d843..40ea1fb 100644 --- a/steps/tests/test_step_01.py +++ b/steps/tests/test_step_01.py @@ -25,7 +25,7 @@ def tearDown(self) -> None: shutil.rmtree(file) else: os.remove(file) - except PermissionError as pe: + except PermissionError: # We don't necessarily care that much continue diff --git a/steps/tests/test_step_02.py b/steps/tests/test_step_02.py index 76e7470..b51064a 100644 --- a/steps/tests/test_step_02.py +++ b/steps/tests/test_step_02.py @@ -25,7 +25,7 @@ def tearDown(self) -> None: shutil.rmtree(file) else: os.remove(file) - except PermissionError as pe: + except PermissionError: # We don't necessarily care that much continue