Skip to content

Commit

Permalink
chore: type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperHG90 committed Oct 20, 2024
1 parent c831954 commit ad38a5d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/dagster_pyiceberg/src/dagster_pyiceberg/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,23 @@ def update_table_spec(self, table: table.Table):
for partition in partitions:
match type_:
case "new":
self._spec_new(update=update, partition=partition)
partition_ = cast(
TablePartitionDimension, partition
)
self._spec_new(update=update, partition=partition_)
case "updated":
partition_ = cast(
TablePartitionDimension, partition
)
self._spec_update(
update=update, partition=partition
update=update, partition=partition_
)
case "deleted":
partition_ = cast(
partitioning.PartitionField, partition
)
self._spec_delete(
update=update, partition_name=partition.name
update=update, partition_name=partition_.name
)
case _:
raise ValueError(
Expand Down Expand Up @@ -555,7 +564,8 @@ def _overwrite_table_with_retries(
if retry.retry_state.attempt_number < retries:
table.refresh()
except RetryError as e:
raise RetryError(f"Commit failed after {retries} retries") from e
# Ignore PyRight error since it's a problem in tenacity
raise RetryError(f"Commit failed after {retries} retries") from e # type: ignore


def _time_window_partition_filter(
Expand Down

0 comments on commit ad38a5d

Please sign in to comment.