From aa19f1365d97993f89b28d492f7194eebd7e96d5 Mon Sep 17 00:00:00 2001 From: Jorrit Sandbrink Date: Tue, 10 Dec 2024 16:58:25 +0400 Subject: [PATCH] remove pyiceberg mypy errors across python version --- mypy.ini | 3 +++ tests/load/pipeline/test_filesystem_pipeline.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index 769e84b13a..5d59c72792 100644 --- a/mypy.ini +++ b/mypy.ini @@ -135,3 +135,6 @@ ignore_missing_imports = True [mypy-time_machine.*] ignore_missing_imports = True + +[mypy-pyiceberg.*] +ignore_missing_imports = True diff --git a/tests/load/pipeline/test_filesystem_pipeline.py b/tests/load/pipeline/test_filesystem_pipeline.py index 05c8541e73..c70fa5ab5d 100644 --- a/tests/load/pipeline/test_filesystem_pipeline.py +++ b/tests/load/pipeline/test_filesystem_pipeline.py @@ -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 @@ -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)