Skip to content

Commit 8b0b522

Browse files
committed
FIX: ruff checks in expressions/pytables
1 parent ca91dd4 commit 8b0b522

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/core/computation/expressions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _evaluate_numexpr(op, op_str, left_op, right_op):
108108
try:
109109
result = ne.evaluate(
110110
f"left_value {op_str} right_value",
111-
local_dict={"left_value": left_value, "right_value": right_op},
111+
local_dict={"left_value": left_value, "right_value": right_value},
112112
casting="safe",
113113
)
114114
except TypeError:
@@ -257,7 +257,10 @@ def where(cond, left_op, right_op, use_numexpr: bool = True):
257257
Whether to try to use numexpr.
258258
"""
259259
assert _where is not None
260-
return _where(cond, left_op, right_op) if use_numexpr else _where_standard(cond, left_op, right_op)
260+
if use_numexpr:
261+
return _where_standard(cond, left_op, right_op)
262+
else:
263+
return _where(cond, left_op, right_op)
261264

262265

263266
def set_test_mode(v: bool = True) -> None:

0 commit comments

Comments
 (0)