Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed May 17, 2024
1 parent 16aa68f commit 563aedc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions defog/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ def execute_query_once(db_type: str, db_creds, query: str):

cur.execute(query)
colnames = [desc[0] for desc in cur.description]

# if there are any column names that are the same, we need to deduplicate them
colnames = [f"{col}_{i}" if colnames.count(col) > 1 else col for i, col in enumerate(colnames)]
colnames = [
f"{col}_{i}" if colnames.count(col) > 1 else col
for i, col in enumerate(colnames)
]

results = cur.fetchall()
cur.close()
Expand Down

0 comments on commit 563aedc

Please sign in to comment.