Skip to content

Commit 70d64a2

Browse files
majiayu000claude
andcommitted
STY: Fix code formatting and import sorting
- Fix ruff-format issue with y_has_na expression - Fix isort import ordering 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 35803bc commit 70d64a2

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

pandas/core/ops/array_ops.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from __future__ import annotations
77

88
import datetime
9-
from functools import partial
109
import operator
10+
from functools import partial
1111
from typing import (
1212
TYPE_CHECKING,
1313
Any,
@@ -20,6 +20,8 @@
2020
Timedelta,
2121
Timestamp,
2222
lib,
23+
)
24+
from pandas._libs import (
2325
ops as libops,
2426
)
2527
from pandas._libs.tslibs import (
@@ -28,7 +30,12 @@
2830
is_supported_dtype,
2931
is_unitless,
3032
)
31-
33+
from pandas.core import roperator
34+
from pandas.core.computation import expressions
35+
from pandas.core.construction import (
36+
ensure_wrapped_if_datetimelike,
37+
sanitize_array,
38+
)
3239
from pandas.core.dtypes.cast import (
3340
construct_1d_object_array_from_listlike,
3441
find_common_type,
@@ -50,13 +57,6 @@
5057
isna,
5158
notna,
5259
)
53-
54-
from pandas.core import roperator
55-
from pandas.core.computation import expressions
56-
from pandas.core.construction import (
57-
ensure_wrapped_if_datetimelike,
58-
sanitize_array,
59-
)
6060
from pandas.core.ops import missing
6161
from pandas.core.ops.dispatch import should_extension_dispatch
6262
from pandas.core.ops.invalid import invalid_comparison
@@ -137,11 +137,8 @@ def comp_method_OBJECT_ARRAY(op, x, y):
137137
# GH#63328: Check if there are pd.NA values in the input and return
138138
# BooleanArray to properly propagate NA in comparisons
139139
x_has_na = any(val is libmissing.NA for val in x.ravel())
140-
y_has_na = (
141-
is_scalar(y) and y is libmissing.NA
142-
) or (
143-
isinstance(y, np.ndarray)
144-
and any(val is libmissing.NA for val in y.ravel())
140+
y_has_na = (is_scalar(y) and y is libmissing.NA) or (
141+
isinstance(y, np.ndarray) and any(val is libmissing.NA for val in y.ravel())
145142
)
146143

147144
if x_has_na or y_has_na:

0 commit comments

Comments
 (0)