File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ warn_unused_ignores = true
4242module = " structlog.*"
4343ignore_missing_imports = true
4444
45+ [[tool .mypy .overrides ]]
46+ # These files have type: ignore comments for ty that mypy doesn't need
47+ module = [" vgi.examples.scalar" , " vgi.table_function" ]
48+ warn_unused_ignores = false
49+
4550[tool .ty .environment ]
4651python-version = " 3.12"
4752
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def output_type(self) -> pa.DataType:
5252
5353 def compute (self , batch : pa .RecordBatch ) -> pa .Array [Any ]:
5454 """Double the values in the specified column."""
55- return pc .multiply (batch .column (self .column ), 2 )
55+ return pc .multiply (batch .column (self .column ), 2 ) # type: ignore[no-matching-overload]
5656
5757
5858class AddColumnsFunction (ScalarFunction ):
@@ -109,4 +109,4 @@ def output_type(self) -> pa.DataType:
109109
110110 def compute (self , batch : pa .RecordBatch ) -> pa .Array [Any ]:
111111 """Convert the column values to uppercase."""
112- return pc .utf8_upper (batch .column (self .column ))
112+ return pc .utf8_upper (batch .column (self .column )) # type: ignore[no-matching-overload]
Original file line number Diff line number Diff line change 2323
2424from collections .abc import Generator
2525from dataclasses import dataclass
26- from typing import Any , final
26+ from typing import Any , Self , final
2727
2828import pyarrow as pa
2929import structlog
@@ -331,14 +331,14 @@ def serialize(self) -> bytes:
331331 return vgi .ipc_utils .serialize_record_batch (batch )
332332
333333 @classmethod
334- def deserialize (cls , batch : pa .RecordBatch ) -> "TableFunctionInitInput" :
334+ def deserialize (cls , batch : pa .RecordBatch ) -> Self : # type: ignore[override]
335335 """Deserialize TableFunctionInitInput from a RecordBatch."""
336336 values = batch .to_pylist ()[0 ]
337337 # Handle backward compatibility: ignore extra fields
338338 return cls (projection_ids = values .get ("projection_ids" ))
339339
340340 @classmethod
341- def deserialize_bytes (cls , data : bytes ) -> "TableFunctionInitInput" :
341+ def deserialize_bytes (cls , data : bytes ) -> Self :
342342 """Deserialize TableFunctionInitInput from bytes."""
343343 batch = vgi .ipc_utils .deserialize_record_batch (data )
344344 return cls .deserialize (batch )
You can’t perform that action at this time.
0 commit comments