This commit is contained in:
2025-05-22 20:25:38 +02:00
parent 09f6750c2b
commit ce03fbf12f
529 changed files with 3353 additions and 3312 deletions

View File

@@ -307,7 +307,7 @@ class Operators:
)
def against(other: Any) -> Operators:
return operator(self, other) # type: ignore
return operator(self, other)
return against
@@ -569,8 +569,16 @@ class ColumnOperators(Operators):
"""
return self.operate(le, other)
# TODO: not sure why we have this
__hash__ = Operators.__hash__ # type: ignore
# ColumnOperators defines an __eq__ so it must explicitly declare also
# an hash or it's set to None by python:
# https://docs.python.org/3/reference/datamodel.html#object.__hash__
if TYPE_CHECKING:
def __hash__(self) -> int:
...
else:
__hash__ = Operators.__hash__
def __eq__(self, other: Any) -> ColumnOperators: # type: ignore[override]
"""Implement the ``==`` operator.
@@ -2533,8 +2541,8 @@ _PRECEDENCE: Dict[OperatorType, int] = {
bitwise_and_op: 7,
bitwise_lshift_op: 7,
bitwise_rshift_op: 7,
concat_op: 6,
filter_op: 6,
concat_op: 5,
match_op: 5,
not_match_op: 5,
regexp_match_op: 5,