Skip to content

Commit

Permalink
mypy fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Aug 2, 2023
1 parent a5b1683 commit 4f93f77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pandas/tests/extension/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@ def check_accumulate(self, ser, op_name, skipna):
tm.assert_series_equal(result, expected, check_dtype=False)

def _supports_accumulation(self, ser: pd.Series, op_name: str) -> bool:
pa_type = ser.dtype.pyarrow_dtype
# error: Item "dtype[Any]" of "dtype[Any] | ExtensionDtype" has no
# attribute "pyarrow_dtype"
pa_type = ser.dtype.pyarrow_dtype # type: ignore[union-attr]

if pa.types.is_string(pa_type) or pa.types.is_binary(pa_type):
if op_name in ["cumsum", "cumprod"]:
Expand Down

0 comments on commit 4f93f77

Please sign in to comment.