Skip to content

Commit a33325c

Browse files
committed
mypy fixup
1 parent 98c7b49 commit a33325c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pandas/core/arrays/_arrow_string_mixins.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,18 @@ def _str_find(self, sub: str, start: int = 0, end: int | None = None):
156156
and not (start == 0 and end is None)
157157
):
158158
# GH#59562
159-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
160-
return self._convert_int_result(pa.chunked_array(result))
159+
res_list = self._apply_elementwise(lambda val: val.find(sub, start, end))
160+
return self._convert_int_result(pa.chunked_array(res_list))
161161

162162
if (start == 0 or start is None) and end is None:
163163
result = pc.find_substring(self._pa_array, sub)
164164
else:
165165
if sub == "":
166166
# GH#56792
167-
result = self._apply_elementwise(lambda val: val.find(sub, start, end))
168-
return self._convert_int_result(pa.chunked_array(result))
167+
res_list = self._apply_elementwise(
168+
lambda val: val.find(sub, start, end)
169+
)
170+
return self._convert_int_result(pa.chunked_array(res_list))
169171
if start is None:
170172
start_offset = 0
171173
start = 0

pandas/core/arrays/string_arrow.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ def astype(self, dtype, copy: bool = True):
282282
_str_map = BaseStringArray._str_map
283283
_str_startswith = ArrowStringArrayMixin._str_startswith
284284
_str_endswith = ArrowStringArrayMixin._str_endswith
285-
_str_find = ArrowExtensionArray._str_find
286285

287286
def _str_contains(
288287
self, pat, case: bool = True, flags: int = 0, na=np.nan, regex: bool = True

0 commit comments

Comments
 (0)