Skip to content

Commit a3650a9

Browse files
rhshadrachWillAyd
authored andcommitted
mypy fixups
1 parent 7c12f15 commit a3650a9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pandas/core/arrays/arrow/array.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,8 @@ def _str_accumulate(
17041704
tail = pa.nulls(len(pa_array) - idx, type=pa_array.type)
17051705
pa_array = pa_array[:idx].combine_chunks()
17061706

1707-
pa_result = pa.array(np_func(pa_array), type=pa_array.type)
1707+
# error: Cannot call function of unknown type
1708+
pa_result = pa.array(np_func(pa_array), type=pa_array.type) # type: ignore[operator]
17081709

17091710
assert head is None or tail is None
17101711
if head is not None:

pandas/tests/extension/test_string.py

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
from pandas.compat import HAS_PYARROW
2626

27+
from pandas.core.dtypes.base import StorageExtensionDtype
28+
2729
import pandas as pd
2830
import pandas._testing as tm
2931
from pandas.api.types import is_string_dtype
@@ -193,6 +195,7 @@ def _supports_reduction(self, ser: pd.Series, op_name: str) -> bool:
193195
)
194196

195197
def _supports_accumulation(self, ser: pd.Series, op_name: str) -> bool:
198+
assert isinstance(ser.dtype, StorageExtensionDtype)
196199
return ser.dtype.storage == "pyarrow" and op_name in [
197200
"cummin",
198201
"cummax",

0 commit comments

Comments
 (0)