Skip to content

Commit

Permalink
fix nested f-string
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb Grant <[email protected]>
  • Loading branch information
geocoug committed Aug 1, 2024
1 parent 142f029 commit bfb0e71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crosstab/crosstab.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,9 @@ def _csv_to_sqlite(self: Crosstab) -> sqlite3.Connection:
logger.debug("Creating 'data' table in SQLite database.")
with conn:
cursor = conn.cursor()
coldef = ", ".join([f'"{col}"' for col in self.csv_columns])
cursor.execute(
f"CREATE TABLE data ({', '.join([f'"{col}"' for col in self.csv_columns])});",
f"CREATE TABLE data ({coldef});",
)
cursor.executemany(
f"INSERT INTO data VALUES ({', '.join(['?' for _ in self.csv_columns])});",
Expand Down

0 comments on commit bfb0e71

Please sign in to comment.