Skip to content

Commit 458bd17

Browse files
committed
typing
1 parent c5c108e commit 458bd17

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pandas/core/interchange/column.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ def _dtype_from_pandasdtype(self, dtype) -> tuple[DtypeKind, int, str, str]:
161161
byteorder = dtype.byteorder
162162

163163
if dtype == "bool[pyarrow]":
164-
return kind, dtype.itemsize, ArrowCTypes.BOOL, byteorder
164+
return (
165+
kind,
166+
type.itemsize, # type: ignore[attr-defined]
167+
ArrowCTypes.BOOL,
168+
byteorder,
169+
)
165170

166171
return kind, dtype.itemsize * 8, dtype_to_arrow_c_fmt(dtype), byteorder
167172

@@ -202,7 +207,8 @@ def describe_null(self):
202207
return column_null_dtype, null_value
203208
if isinstance(self._col.dtype, ArrowDtype):
204209
if all(
205-
chunk.buffers()[0] is None for chunk in self._col.array._pa_array.chunks
210+
chunk.buffers()[0] is None
211+
for chunk in self._col.array._pa_array.chunks # type: ignore[attr-defined]
206212
):
207213
return ColumnNullType.NON_NULLABLE, None
208214
return ColumnNullType.USE_BITMASK, 0
@@ -317,7 +323,6 @@ def _get_data_buffer(
317323
dtype = self.dtype
318324
arr = self._col.array
319325
if isinstance(self._col.dtype, ArrowDtype):
320-
arr = self._col.array
321326
buffer = PandasBufferPyarrow(
322327
arr._pa_array, is_validity=False, allow_copy=self._allow_copy
323328
)

0 commit comments

Comments
 (0)