Skip to content

Commit 01c1762

Browse files
committed
🎨 Remove unused var + use 'not in'
1 parent 003c8d7 commit 01c1762

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/mods4pandas/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def insert_into_db(con, table, d: Dict):
356356

357357
# Add columns if necessary
358358
for k in d.keys():
359-
if not k in current_columns[table]:
359+
if k not in current_columns[table]:
360360
assert valid_column_key(k), f'"{k}" is not a valid column name'
361361
current_columns[table].append(k)
362362
con.execute(f'ALTER TABLE {table} ADD COLUMN "{k}"')

src/mods4pandas/mods4pandas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ def process(mets_files: list[str], output_file: str, output_page_info: str):
601601
# noinspection PyTypeChecker
602602
for caught_warning in caught_warnings:
603603
csvwriter.writerow([mets_file, caught_warning.message])
604-
except Exception as e:
604+
except Exception:
605605
logger.exception("Exception in {}".format(mets_file))
606606

607607
logger.info("Writing DataFrame to {}".format(output_file))

0 commit comments

Comments
 (0)