Skip to content

Commit e4c782c

Browse files
committed
mypy fixup
1 parent 472f17a commit e4c782c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pandas/core/arrays/_arrow_string_mixins.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,18 @@ def _str_find(self, sub: str, start: int = 0, end: int | None = None):
221221
and not (start == 0 and end is None)
222222
):
223223
# GH#59562
224-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
225-
return self._convert_int_result(pa.chunked_array(result))
224+
res_list = self._apply_elementwise(lambda val: val.find(sub, start, end))
225+
return self._convert_int_result(pa.chunked_array(res_list))
226226

227227
if (start == 0 or start is None) and end is None:
228228
result = pc.find_substring(self._pa_array, sub)
229229
else:
230230
if sub == "":
231231
# GH#56792
232-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
233-
return self._convert_int_result(pa.chunked_array(result))
232+
res_list = self._apply_elementwise(
233+
lambda val: val.find(sub, start, end)
234+
)
235+
return self._convert_int_result(pa.chunked_array(res_list))
234236
if start is None:
235237
start_offset = 0
236238
start = 0

0 commit comments

Comments
 (0)