Skip to content

Commit

Permalink
chore: address mypy lint warnings [DET-9334] (#6549)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidzr authored Apr 13, 2023
1 parent b221032 commit a3005cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/scripts/replicate-metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


# a class extending psycopg.Cursor that adds logging around each query execute.
class LoggingCursor(psycopg.Cursor):
class LoggingCursor(psycopg.Cursor): # type: ignore
def execute(self, query: Query, *args: Any, **kwargs: Any) -> "LoggingCursor":
print(
f"""====QUERY START====
Expand Down Expand Up @@ -58,7 +58,7 @@ def get_table_col_names(table: str) -> Set[str]:
"""
SELECT column_name FROM information_schema.columns WHERE table_name = %s
""",
(table,), # type: ignore
(table,),
)
rows = cur.fetchall()
return {row[0] for row in rows}
Expand Down Expand Up @@ -113,7 +113,7 @@ def copy_trial(trial_id: int) -> None:
FROM replicated_trials rt
JOIN raw_validations rv ON rv.trial_id = %s;
"""
cur.execute(query, (trial_id, trial_id, trial_id)) # type: ignore
cur.execute(query, (trial_id, trial_id, trial_id))
cur.execute("COMMIT")


Expand Down

0 comments on commit a3005cf

Please sign in to comment.