Skip to content

Commit 2ba214e

Browse files
committed
Fix typing
1 parent 42c7e33 commit 2ba214e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sqlmesh/core/test/definition.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,15 +644,16 @@ def _create_df(
644644
return self._execute(query)
645645

646646
rows = values["rows"]
647+
columns_str: t.Optional[t.List[str]] = None
647648
if columns:
648-
columns = [str(c) for c in columns]
649+
columns_str = [str(c) for c in columns]
649650
referenced_columns = list(dict.fromkeys(col for row in rows for col in row))
650651
_raise_if_unexpected_columns(columns, referenced_columns)
651652

652653
if partial:
653-
columns = [c for c in columns if c in referenced_columns]
654+
columns_str = [c for c in columns_str if c in referenced_columns]
654655

655-
return pd.DataFrame.from_records(rows, columns=columns or None)
656+
return pd.DataFrame.from_records(rows, columns=columns_str)
656657

657658
def _add_missing_columns(
658659
self, query: exp.Query, all_columns: t.Optional[t.Collection[str]] = None

0 commit comments

Comments
 (0)