Skip to content

Commit

Permalink
Use python3 format strings
Browse files Browse the repository at this point in the history
  • Loading branch information
koszti committed Jul 9, 2021
1 parent ef8436b commit bfc8d60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion superset/db_engine_specs/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,4 @@ def cancel_query(cls, cursor: Any, query: Query, cancel_query_id: str) -> None:
:param query: Query instance
:param cancel_query_id: MySQL Connection ID
"""
cursor.execute("KILL CONNECTION %s" % cancel_query_id)
cursor.execute(f"KILL CONNECTION {cancel_query_id}")
2 changes: 1 addition & 1 deletion superset/db_engine_specs/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,5 +324,5 @@ def cancel_query(cls, cursor: Any, query: Query, cancel_query_id: str) -> None:
cursor.execute(
"SELECT pg_terminate_backend(pid) "
"FROM pg_stat_activity "
"WHERE pid='%s'" % cancel_query_id
f"WHERE pid='{cancel_query_id}'"
)
2 changes: 1 addition & 1 deletion superset/db_engine_specs/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ def cancel_query(cls, cursor: Any, query: Query, cancel_query_id: str) -> None:
:param query: Query instance
:param cancel_query_id: Snowflake Session ID
"""
cursor.execute("SELECT SYSTEM$CANCEL_ALL_QUERIES(%s)" % cancel_query_id)
cursor.execute(f"SELECT SYSTEM$CANCEL_ALL_QUERIES({cancel_query_id})")

0 comments on commit bfc8d60

Please sign in to comment.