Skip to content

Commit 336f93e

Browse files
committed
mypy fixup
1 parent 49a1cdc commit 336f93e

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
@@ -170,16 +170,18 @@ def _str_find(self, sub: str, start: int = 0, end: int | None = None):
170170
and not (start == 0 and end is None)
171171
):
172172
# GH#59562
173-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
174-
return self._convert_int_result(pa.chunked_array(result))
173+
res_list = self._apply_elementwise(lambda val: val.find(sub, start, end))
174+
return self._convert_int_result(pa.chunked_array(res_list))
175175

176176
if (start == 0 or start is None) and end is None:
177177
result = pc.find_substring(self._pa_array, sub)
178178
else:
179179
if sub == "":
180180
# GH#56792
181-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
182-
return self._convert_int_result(pa.chunked_array(result))
181+
res_list = self._apply_elementwise(
182+
lambda val: val.find(sub, start, end)
183+
)
184+
return self._convert_int_result(pa.chunked_array(res_list))
183185
if start is None:
184186
start_offset = 0
185187
start = 0

0 commit comments

Comments
 (0)