aboutsummaryrefslogtreecommitdiffstats
path: root/python/quote_parsing/parse_emails.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/quote_parsing/parse_emails.py')
-rw-r--r--python/quote_parsing/parse_emails.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/quote_parsing/parse_emails.py b/python/quote_parsing/parse_emails.py
index b39a16f8..a3a1bd9d 100644
--- a/python/quote_parsing/parse_emails.py
+++ b/python/quote_parsing/parse_emails.py
@@ -614,7 +614,7 @@ def get_current_version(index, series, d, conn):
return version
-def parse_email(email, date_received, conn):
+def parse_email(email: Path, date_received: datetime.date, conn):
get_version = lru_cache()(partial(get_current_version, conn=conn))
with email.open("rt") as fh:
subject = fh.readline().lstrip()
@@ -682,10 +682,10 @@ def write_todb(swaption_stack, index_data, conn):
)
query = sql.SQL(
- "INSERT INTO {}({}) VALUES({}) " "ON CONFLICT DO NOTHING RETURNING ref_id"
+ "INSERT INTO {}({}) VALUES({}) ON CONFLICT DO NOTHING RETURNING ref_id"
)
sql_str = gen_sql_str(query, "swaption_ref_quotes", index_data.columns)
- query = sql.SQL("INSERT INTO {}({}) VALUES({}) " "ON CONFLICT DO NOTHING")
+ query = sql.SQL("INSERT INTO {}({}) VALUES({}) ON CONFLICT DO NOTHING")
index_data["expiry"] = pd.to_datetime(index_data.expiry)
with conn.cursor() as c:
for t in index_data.itertuples(index=False):