From 0c68f868be575ff7fcba6ba20315205d8304d89a Mon Sep 17 00:00:00 2001 From: Bartok9 Date: Mon, 20 Jul 2026 04:07:28 -0400 Subject: [PATCH] fix(connector): use public strip_trailing_semicolon in dry_run paths Main still calls the old private alias _strip_trailing_semicolon in DataFusion and Snowflake dry_run after the helper was renamed/exported as strip_trailing_semicolon on base. That completes as NameError/F821 on every PR merge against main (lint + unit). Point both call sites at the imported public helper. --- core/wren/src/wren/connector/datafusion.py | 2 +- core/wren/src/wren/connector/snowflake.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/wren/src/wren/connector/datafusion.py b/core/wren/src/wren/connector/datafusion.py index da27d46f15..25c6afeafa 100644 --- a/core/wren/src/wren/connector/datafusion.py +++ b/core/wren/src/wren/connector/datafusion.py @@ -43,7 +43,7 @@ def dry_run(self, sql: str) -> None: # break the LIMIT subquery wrap (``SELECT 1;`` is a multi-statement batch # the planner rejects). Strip only the terminating run so ';' inside # string literals stays intact — same helper already used by ``query``. - self.ctx.dry_run(_strip_trailing_semicolon(sql)) + self.ctx.dry_run(strip_trailing_semicolon(sql)) def close(self) -> None: pass diff --git a/core/wren/src/wren/connector/snowflake.py b/core/wren/src/wren/connector/snowflake.py index 15d48bf0b1..37bbdfb48f 100644 --- a/core/wren/src/wren/connector/snowflake.py +++ b/core/wren/src/wren/connector/snowflake.py @@ -88,7 +88,7 @@ def query(self, sql: str, limit: int | None = None) -> pa.Table: def dry_run(self, sql: str) -> None: # ``describe`` still fails when the statement is terminated with ``;`` # (ProgrammingError: unexpected ';'). Strip only the trailing run. - cleaned = _strip_trailing_semicolon(sql) + cleaned = strip_trailing_semicolon(sql) try: with self.connection.cursor() as cursor: cursor.describe(cleaned)