Skip to content

Commit

Permalink
remove pyiceberg mypy errors across python version
Browse files Browse the repository at this point in the history
  • Loading branch information
jorritsandbrink committed Dec 10, 2024
1 parent 156d518 commit aa19f13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ ignore_missing_imports = True

[mypy-time_machine.*]
ignore_missing_imports = True

[mypy-pyiceberg.*]
ignore_missing_imports = True
3 changes: 2 additions & 1 deletion tests/load/pipeline/test_filesystem_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ def test_table_format_get_tables_helper(
destination_config: DestinationTestConfiguration,
) -> None:
"""Tests `get_delta_tables` / `get_iceberg_tables` helper functions."""
get_tables: Any
if destination_config.table_format == "delta":
from dlt.common.libs.deltalake import DeltaTable, get_delta_tables

Expand All @@ -1013,7 +1014,7 @@ def test_table_format_get_tables_helper(
elif destination_config.table_format == "iceberg":
from dlt.common.libs.pyiceberg import IcebergTable, get_iceberg_tables

get_tables = get_iceberg_tables # type: ignore[assignment]
get_tables = get_iceberg_tables
get_num_rows = lambda table: table.scan().to_arrow().num_rows

@dlt.resource(table_format=destination_config.table_format)
Expand Down

0 comments on commit aa19f13

Please sign in to comment.