Skip to content

Commit fab8f6f

Browse files
committed
fix: undo other formatting changes
1 parent 7a6ed6e commit fab8f6f

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

pandas/core/computation/eval.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,10 @@ def eval(
371371
is_extension_array_dtype(parsed_expr.terms.return_type)
372372
and not is_string_dtype(parsed_expr.terms.return_type)
373373
)
374-
or (
375-
getattr(parsed_expr.terms, "operand_types", None) is not None
376-
and any(
377-
(is_extension_array_dtype(elem) and not is_string_dtype(elem))
378-
for elem in parsed_expr.terms.operand_types
379-
)
374+
or getattr(parsed_expr.terms, "operand_types", None) is not None
375+
and any(
376+
(is_extension_array_dtype(elem) and not is_string_dtype(elem))
377+
for elem in parsed_expr.terms.operand_types
380378
)
381379
):
382380
warnings.warn(

pandas/core/computation/expr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,8 @@ def _maybe_evaluate_binop(
512512
)
513513

514514
if self.engine != "pytables" and (
515-
(res.op in CMP_OPS_SYMS and getattr(lhs, "is_datetime", False))
515+
res.op in CMP_OPS_SYMS
516+
and getattr(lhs, "is_datetime", False)
516517
or getattr(rhs, "is_datetime", False)
517518
):
518519
# all date ops must be done in python bc numexpr doesn't work

pandas/core/computation/pytables.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,11 @@ def prune(self, klass):
408408
operand = operand.prune(klass)
409409

410410
if operand is not None and (
411-
(issubclass(klass, ConditionBinOp) and operand.condition is not None)
412-
or (
413-
not issubclass(klass, ConditionBinOp)
414-
and issubclass(klass, FilterBinOp)
415-
and operand.filter is not None
416-
)
411+
issubclass(klass, ConditionBinOp)
412+
and operand.condition is not None
413+
or not issubclass(klass, ConditionBinOp)
414+
and issubclass(klass, FilterBinOp)
415+
and operand.filter is not None
417416
):
418417
return operand.invert()
419418
return None

pandas/core/computation/scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class Scope:
140140
temps : dict
141141
"""
142142

143-
__slots__ = ["level", "resolvers", "scope", "target", "temps"]
143+
__slots__ = ["level", "scope", "target", "resolvers", "temps"]
144144
level: int
145145
scope: DeepChainMap
146146
resolvers: DeepChainMap

0 commit comments

Comments
 (0)