Skip to content

Commit 658ab8b

Browse files
committed
style(clickhouse): use f-strings for metadata warnings
Signed-off-by: Michael Day <mdaytn@gmail.com>
1 parent 939da1f commit 658ab8b

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎sqlmesh/core/engine_adapter/clickhouse.py‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,9 +1139,8 @@ def _database_engine(self, database: str) -> t.Optional[str]:
11391139
engine = str(row[0])
11401140
except Exception as ex:
11411141
logger.warning(
1142-
"Failed to determine engine for ClickHouse database '%s'; keeping ON CLUSTER: %s",
1143-
database,
1144-
ex,
1142+
f"Failed to determine engine for ClickHouse database '{database}'; "
1143+
f"keeping ON CLUSTER: {ex}"
11451144
)
11461145
# Keep this call fail-open, but retry the lookup on the next DDL.
11471146
return None
@@ -1167,8 +1166,7 @@ def _on_cluster_target_database(self, target: t.Optional[TableName]) -> t.Option
11671166
return self._connection_database
11681167
except Exception as ex:
11691168
logger.warning(
1170-
"Failed to determine current ClickHouse database; keeping ON CLUSTER: %s",
1171-
ex,
1169+
f"Failed to determine current ClickHouse database; keeping ON CLUSTER: {ex}"
11721170
)
11731171
return None
11741172

@@ -1194,8 +1192,7 @@ def _should_use_on_cluster(self, target: t.Optional[TableName] = None) -> bool:
11941192
has_replicated_database = self._has_replicated_database
11951193
except Exception as ex:
11961194
logger.warning(
1197-
"Failed to check for Replicated ClickHouse databases; keeping ON CLUSTER: %s",
1198-
ex,
1195+
f"Failed to check for Replicated ClickHouse databases; keeping ON CLUSTER: {ex}"
11991196
)
12001197
return True
12011198

0 commit comments

Comments
 (0)