Skip to content

Commit bbc6623

Browse files
authored
Fix type hints of SnowflakeCursor.describe and SnowflakeCursor. _describe_internal (#1829)
1 parent 67df7b1 commit bbc6623

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/snowflake/connector/cursor.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,9 +1145,7 @@ def execute_async(self, *args: Any, **kwargs: Any) -> dict[str, Any]:
11451145
kwargs["_exec_async"] = True
11461146
return self.execute(*args, **kwargs)
11471147

1148-
def describe(
1149-
self, *args: Any, **kwargs: Any
1150-
) -> list[ResultMetadata | ResultMetadataV2]:
1148+
def describe(self, *args: Any, **kwargs: Any) -> list[ResultMetadata]:
11511149
"""Obtain the schema of the result without executing the query.
11521150
11531151
This function takes the same arguments as execute, please refer to that function
@@ -1163,9 +1161,7 @@ def describe(
11631161
return None
11641162
return [meta._to_result_metadata_v1() for meta in self._description]
11651163

1166-
def _describe_internal(
1167-
self, *args: Any, **kwargs: Any
1168-
) -> list[ResultMetadata | ResultMetadataV2]:
1164+
def _describe_internal(self, *args: Any, **kwargs: Any) -> list[ResultMetadataV2]:
11691165
"""Obtain the schema of the result without executing the query.
11701166
11711167
This function takes the same arguments as execute, please refer to that function

0 commit comments

Comments
 (0)