Skip to content

Commit

Permalink
format fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Liam Murphy <[email protected]>
  • Loading branch information
liamphmurphy committed Feb 15, 2025
1 parent 161056d commit ff8cf2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion python/deltalake/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,9 @@ def repair(
post_commithook_properties,
)
deserialized_metrics = json.loads(metrics)
deserialized_metrics[FSCK_METRICS_FILES_REMOVED_LABEL] = json.loads(deserialized_metrics[FSCK_METRICS_FILES_REMOVED_LABEL])
deserialized_metrics[FSCK_METRICS_FILES_REMOVED_LABEL] = json.loads(
deserialized_metrics[FSCK_METRICS_FILES_REMOVED_LABEL]
)
return deserialized_metrics

def transaction_versions(self) -> Dict[str, Transaction]:
Expand Down
6 changes: 2 additions & 4 deletions python/tests/pyspark_integration/test_write_to_pyspark.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Tests that deltalake(delta-rs) can write to tables written by PySpark."""

import pathlib
import os
import pathlib

import pyarrow as pa
import pytest
Expand Down Expand Up @@ -171,6 +171,7 @@ def test_spark_read_z_ordered_history(tmp_path: pathlib.Path):

assert latest_operation_metrics["operationMetrics"] is not None


@pytest.mark.pyspark
@pytest.mark.integration
def test_spark_read_repair_run(tmp_path):
Expand All @@ -181,7 +182,6 @@ def test_spark_read_repair_run(tmp_path):
value_array = pa.array(values, type=pa.int32())

pa_table = pa.Table.from_arrays([id_array, value_array], names=["id", "value"])

write_deltalake(tmp_path, pa_table, mode="append")
write_deltalake(tmp_path, pa_table, mode="append")
dt = DeltaTable(tmp_path)
Expand All @@ -197,5 +197,3 @@ def test_spark_read_repair_run(tmp_path):
)

assert latest_operation_metrics["operationMetrics"] is not None


2 changes: 0 additions & 2 deletions python/tests/test_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ def test_repair_wo_dry_run(tmp_path, sample_data):
assert metrics["dry_run"] is False
assert last_action["operation"] == "FSCK"
assert last_action["userName"] == "John Doe"


0 comments on commit ff8cf2d

Please sign in to comment.