Skip to content

Commit 04dc4af

Browse files
rustyconoverclaude
andcommitted
tests: type the write-result helper fixtures for mypy tests/
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4dd772e commit 04dc4af

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎tests/test_write_results_helpers.py‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from __future__ import annotations
66

77
from types import SimpleNamespace
8+
from typing import Any
89

910
import pyarrow as pa
1011
import pytest
@@ -28,11 +29,9 @@
2829
write_rows_batch,
2930
)
3031

31-
TABLE = pa.schema(
32-
[pa.field("id", pa.int32(), nullable=False), pa.field("name", pa.string()), row_id_field()],
33-
metadata={b"k": b"v"},
34-
)
35-
USER = pa.schema([pa.field("id", pa.int32(), nullable=False), pa.field("name", pa.string())])
32+
_USER_FIELDS: list[pa.Field[Any]] = [pa.field("id", pa.int32(), nullable=False), pa.field("name", pa.string())]
33+
TABLE = pa.schema([*_USER_FIELDS, row_id_field()], metadata={b"k": b"v"})
34+
USER = pa.schema(_USER_FIELDS)
3635

3736

3837
def test_exported_from_both_packages() -> None:
@@ -134,7 +133,7 @@ def _options_bytes(**columns: object) -> bytes:
134133
return serialize_record_batch_bytes(pa.RecordBatch.from_pylist([columns]))
135134

136135

137-
def _bind_call(named: dict[str, pa.Scalar] | None) -> SimpleNamespace:
136+
def _bind_call(named: dict[str, pa.Scalar[Any]] | None) -> SimpleNamespace:
138137
return SimpleNamespace(arguments=Arguments(named=named or {}))
139138

140139

0 commit comments

Comments
 (0)