Skip to content

Commit a7c1f18

Browse files
committed
test: keep the batch-index assertions typed under the new pyarrow stubs
The vgi-rpc 0.42.1 relock brought pyarrow stubs where to_pylist() is list[Any | None], so sorted()/min()/sum() over the batch_index columns no longer type-check. Cast at the boundary, as the rest of this file already does for ProcessParams.
1 parent 57539e9 commit a7c1f18

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/test_examples_workers.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ def test_batch_index_worker_reports_input_order() -> None:
111111
out = list(
112112
client.table_buffering_function(function_name="batch_indexes", schema_name="main", input=iter(batches))
113113
)
114-
indexes = [v for b in out for v in b.column("batch_index").to_pylist()]
115-
rows = [v for b in out for v in b.column("rows").to_pylist()]
114+
indexes = cast("list[int]", [v for b in out for v in b.column("batch_index").to_pylist()])
115+
rows = cast("list[int]", [v for b in out for v in b.column("rows").to_pylist()])
116116
# One report row per input batch, ordered by index, and none defaulted to -1.
117117
assert indexes == sorted(indexes)
118118
assert len(set(indexes)) == 3

0 commit comments

Comments
 (0)