Skip to content

Commit 7b6189f

Browse files
committed
mypy fixup
1 parent 517fdd0 commit 7b6189f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pandas/core/arrays/_arrow_string_mixins.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,18 @@ def _str_find(self, sub: str, start: int = 0, end: int | None = None):
206206
and not (start == 0 and end is None)
207207
):
208208
# GH#59562
209-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
210-
return self._convert_int_result(pa.chunked_array(result))
209+
res_list = self._apply_elementwise(lambda val: val.find(sub, start, end))
210+
return self._convert_int_result(pa.chunked_array(res_list))
211211

212212
if (start == 0 or start is None) and end is None:
213213
result = pc.find_substring(self._pa_array, sub)
214214
else:
215215
if sub == "":
216216
# GH#56792
217-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
218-
return self._convert_int_result(pa.chunked_array(result))
217+
res_list = self._apply_elementwise(
218+
lambda val: val.find(sub, start, end)
219+
)
220+
return self._convert_int_result(pa.chunked_array(res_list))
219221
if start is None:
220222
start_offset = 0
221223
start = 0

0 commit comments

Comments
 (0)