Skip to content

Commit

Permalink
Merge pull request #52 from yassun7010/fix_never_case
Browse files Browse the repository at this point in the history
fix: never case.
  • Loading branch information
yassun7010 authored Jan 29, 2024
2 parents 8dc8ef6 + 37f02bf commit bbf84d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion turu-snowflake/src/turu/snowflake/mock_async_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ def inject_response( # type: ignore[override]
],
response: Union[Sequence[Any], Any, Exception] = None,
) -> Self:
if row_type is not None and isinstance(response, PandasDataFlame):
if (
row_type is not None
and PandasDataFlame is not Never
and isinstance(response, PandasDataFlame)
):
response = (response,)

self._turu_mock_store.inject_response(
Expand Down
6 changes: 5 additions & 1 deletion turu-snowflake/src/turu/snowflake/mock_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ def inject_response( # type: ignore[override]
],
response: Union[Sequence[Any], Any, Exception] = None,
) -> Self:
if row_type is not None and isinstance(response, PandasDataFlame):
if (
row_type is not None
and PandasDataFlame is not Never
and isinstance(response, PandasDataFlame)
):
response = (response,)

self._turu_mock_store.inject_response(
Expand Down

0 comments on commit bbf84d8

Please sign in to comment.