Skip to content

Commit 97fd4f8

Browse files
fixup linting + test without pyarrow
1 parent 19a62d6 commit 97fd4f8

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pandas/_testing/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from typing import (
88
TYPE_CHECKING,
99
ContextManager,
10-
cast,
1110
)
1211

1312
import numpy as np
@@ -512,9 +511,6 @@ def shares_memory(left, right) -> bool:
512511
if isinstance(left, ArrowExtensionArray):
513512
if isinstance(right, ArrowExtensionArray):
514513
# https://github.com/pandas-dev/pandas/pull/43930#discussion_r736862669
515-
# breakpoint()
516-
left = cast("ArrowExtensionArray", left)
517-
right = cast("ArrowExtensionArray", right)
518514
left_pa_data = left._pa_array
519515
right_pa_data = right._pa_array
520516
left_buf1 = left_pa_data.chunk(0).buffers()[1]

pandas/tests/copy_view/test_astype.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import numpy as np
44
import pytest
55

6+
from pandas.compat import HAS_PYARROW
67
from pandas.compat.pyarrow import pa_version_under12p0
78

89
from pandas import (
@@ -223,7 +224,7 @@ def test_convert_dtypes(using_infer_string):
223224
df_orig = df.copy()
224225
df2 = df.convert_dtypes()
225226

226-
if using_infer_string:
227+
if using_infer_string and HAS_PYARROW:
227228
# TODO the default nullable string dtype still uses python storage
228229
# this should be changed to pyarrow if installed
229230
assert not tm.shares_memory(get_array(df2, "a"), get_array(df, "a"))

0 commit comments

Comments
 (0)