Skip to content

Commit aeae12c

Browse files
committed
mypy fixup
1 parent 66e391c commit aeae12c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/arrays/arrow/array.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,14 @@ def _box_pa_array(
518518
dta = DatetimeArray._from_sequence(
519519
value, copy=copy, dtype=pass_dtype
520520
)
521-
mask = dta.isna()
522-
value_i8 = dta.view("i8")
523-
if not np.asarray(value_i8).flags["WRITEABLE"]:
521+
dta_mask = dta.isna()
522+
value_i8 = cast("npt.NDArray", dta.view("i8"))
523+
if not value_i8.flags["WRITEABLE"]:
524524
# e.g. test_setitem_frame_2d_values
525525
value_i8 = value_i8.copy()
526526
dta = DatetimeArray._from_sequence(value_i8, dtype=dta.dtype)
527-
value_i8[mask] = 0 # GH#61776 avoid __sub__ overflow
528-
pa_array = pa.array(dta._ndarray, type=pa_type, mask=mask)
527+
value_i8[dta_mask] = 0 # GH#61776 avoid __sub__ overflow
528+
pa_array = pa.array(dta._ndarray, type=pa_type, mask=dta_mask)
529529
return pa_array
530530

531531
try:

0 commit comments

Comments
 (0)