Skip to content

Commit

Permalink
fixup linting + test without pyarrow
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Nov 8, 2024
1 parent 19a62d6 commit 97fd4f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions pandas/_testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from typing import (
TYPE_CHECKING,
ContextManager,
cast,
)

import numpy as np
Expand Down Expand Up @@ -512,9 +511,6 @@ def shares_memory(left, right) -> bool:
if isinstance(left, ArrowExtensionArray):
if isinstance(right, ArrowExtensionArray):
# https://github.com/pandas-dev/pandas/pull/43930#discussion_r736862669
# breakpoint()
left = cast("ArrowExtensionArray", left)
right = cast("ArrowExtensionArray", right)
left_pa_data = left._pa_array
right_pa_data = right._pa_array
left_buf1 = left_pa_data.chunk(0).buffers()[1]
Expand Down
3 changes: 2 additions & 1 deletion pandas/tests/copy_view/test_astype.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import pytest

from pandas.compat import HAS_PYARROW
from pandas.compat.pyarrow import pa_version_under12p0

from pandas import (
Expand Down Expand Up @@ -223,7 +224,7 @@ def test_convert_dtypes(using_infer_string):
df_orig = df.copy()
df2 = df.convert_dtypes()

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

0 comments on commit 97fd4f8

Please sign in to comment.