Skip to content

Commit

Permalink
fix: ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
yassun7010 committed Jan 29, 2024
1 parent 6d8d8ff commit 27387dd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions turu-snowflake/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ typecheck = "pyright src/** tests/**"
test = "pytest -n auto --cov=src --cov-report=term --cov-report=xml tests"
ci = "task format && task lint && task typecheck && task test"

[tool.pyright]
reportOverlappingOverload = "none"

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
4 changes: 3 additions & 1 deletion turu-snowflake/src/turu/snowflake/mock_async_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def inject_response_from_csv( # type: ignore[override]
)

else:
super().inject_response_from_csv(row_type, filepath, **options)
super().inject_response_from_csv(
cast(Optional[Type[GenericRowType]], row_type), filepath, **options
)

return self
4 changes: 3 additions & 1 deletion turu-snowflake/src/turu/snowflake/mock_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def inject_response_from_csv( # type: ignore[override]
)

else:
super().inject_response_from_csv(row_type, filepath, **options)
super().inject_response_from_csv(
cast(Optional[Type[GenericRowType]], row_type), filepath, **options
)

return self
2 changes: 1 addition & 1 deletion turu-snowflake/tests/turu/test_snowflake_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_inject_pandas_response_from_csv_with_pandera_validation(
self, mock_connection: turu.snowflake.MockConnection
):
import pandas as pd
import pandera as pa
import pandera as pa # type: ignore[import]

class RowModel(pa.DataFrameModel):
ID: pa.Int64
Expand Down
6 changes: 4 additions & 2 deletions turu-snowflake/tests/turu/test_snowflake_mock_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,15 @@ async def test_inject_pandas_response_from_csv(
) as cursor:
assert (await cursor.fetch_pandas_all()).equals(expected)

@pytest.mark.skipif(not USE_PANDAS, reason="pandas is not installed")
@pytest.mark.skipif(
not (USE_PANDAS and USE_PANDERA), reason="pandas is not installed"
)
@pytest.mark.asyncio
async def test_inject_pandas_response_from_csv_with_pandera_validation(
self, mock_async_connection: turu.snowflake.MockAsyncConnection
):
import pandas as pd
import pandera as pa
import pandera as pa # type: ignore[import]

class RowModel(pa.DataFrameModel):
ID: pa.Int64
Expand Down

0 comments on commit 27387dd

Please sign in to comment.