diff --git a/midas/checker/frames/column_methods.py b/midas/checker/frames/column_methods.py index 4b101f2..c9da035 100644 --- a/midas/checker/frames/column_methods.py +++ b/midas/checker/frames/column_methods.py @@ -136,6 +136,30 @@ class ColumnMethodRegistry(MethodRegistry[Call]): def pow(self, call: Call) -> Type: return self._element_wise(call, "__pow__") + @method("lt", "__lt__") + def lt(self, call: Call) -> Type: + return self._element_wise(call, "__lt__") + + @method("gt", "__gt__") + def gt(self, call: Call) -> Type: + return self._element_wise(call, "__gt__") + + @method("le", "__le__") + def le(self, call: Call) -> Type: + return self._element_wise(call, "__le__") + + @method("ge", "__ge__") + def ge(self, call: Call) -> Type: + return self._element_wise(call, "__ge__") + + @method("ne", "__ne__") + def ne(self, call: Call) -> Type: + return self._element_wise(call, "__ne__") + + @method("eq", "__eq__") + def eq(self, call: Call) -> Type: + return self._element_wise(call, "__eq__") + @method() def mean(self, call: Call) -> Type: signature = Function( diff --git a/tests/cases/checker/09_frame_ops.py.ref.json b/tests/cases/checker/09_frame_ops.py.ref.json index d30278e..78ca071 100644 --- a/tests/cases/checker/09_frame_ops.py.ref.json +++ b/tests/cases/checker/09_frame_ops.py.ref.json @@ -1,174 +1,5 @@ { - "diagnostics": [ - { - "type": "Warning", - "location": { - "start": [ - 16, - 4 - ], - "end": [ - 16, - 13 - ] - }, - "message": "Unknown method __lt__ on Column[int]" - }, - { - "type": "Warning", - "location": { - "start": [ - 16, - 4 - ], - "end": [ - 16, - 13 - ] - }, - "message": "Unknown method __lt__ on Column[float]" - }, - { - "type": "Warning", - "location": { - "start": [ - 17, - 4 - ], - "end": [ - 17, - 13 - ] - }, - "message": "Unknown method __gt__ on Column[int]" - }, - { - "type": "Warning", - "location": { - "start": [ - 17, - 4 - ], - "end": [ - 17, - 13 - ] - }, - "message": "Unknown method __gt__ on Column[float]" - }, - { - "type": "Warning", - "location": { - "start": [ - 18, - 4 - ], - "end": [ - 18, - 14 - ] - }, - "message": "Unknown method __le__ on Column[int]" - }, - { - "type": "Warning", - "location": { - "start": [ - 18, - 4 - ], - "end": [ - 18, - 14 - ] - }, - "message": "Unknown method __le__ on Column[float]" - }, - { - "type": "Warning", - "location": { - "start": [ - 19, - 4 - ], - "end": [ - 19, - 14 - ] - }, - "message": "Unknown method __ge__ on Column[int]" - }, - { - "type": "Warning", - "location": { - "start": [ - 19, - 4 - ], - "end": [ - 19, - 14 - ] - }, - "message": "Unknown method __ge__ on Column[float]" - }, - { - "type": "Warning", - "location": { - "start": [ - 20, - 4 - ], - "end": [ - 20, - 14 - ] - }, - "message": "Unknown method __eq__ on Column[int]" - }, - { - "type": "Warning", - "location": { - "start": [ - 20, - 4 - ], - "end": [ - 20, - 14 - ] - }, - "message": "Unknown method __eq__ on Column[float]" - }, - { - "type": "Warning", - "location": { - "start": [ - 21, - 4 - ], - "end": [ - 21, - 14 - ] - }, - "message": "Unknown method __eq__ on Column[int]" - }, - { - "type": "Warning", - "location": { - "start": [ - 21, - 4 - ], - "end": [ - 21, - 14 - ] - }, - "message": "Unknown method __eq__ on Column[float]" - } - ], + "diagnostics": [], "judgments": [ { "location": { @@ -983,14 +814,18 @@ "index": 0, "name": "a", "type": { - "type": {} + "type": { + "name": "bool" + } } }, { "index": 1, "name": "b", "type": { - "type": {} + "type": { + "name": "bool" + } } } ] @@ -1083,14 +918,18 @@ "index": 0, "name": "a", "type": { - "type": {} + "type": { + "name": "bool" + } } }, { "index": 1, "name": "b", "type": { - "type": {} + "type": { + "name": "bool" + } } } ] @@ -1183,14 +1022,18 @@ "index": 0, "name": "a", "type": { - "type": {} + "type": { + "name": "bool" + } } }, { "index": 1, "name": "b", "type": { - "type": {} + "type": { + "name": "bool" + } } } ] @@ -1283,14 +1126,18 @@ "index": 0, "name": "a", "type": { - "type": {} + "type": { + "name": "bool" + } } }, { "index": 1, "name": "b", "type": { - "type": {} + "type": { + "name": "bool" + } } } ] @@ -1383,14 +1230,18 @@ "index": 0, "name": "a", "type": { - "type": {} + "type": { + "name": "bool" + } } }, { "index": 1, "name": "b", "type": { - "type": {} + "type": { + "name": "bool" + } } } ] @@ -1483,14 +1334,18 @@ "index": 0, "name": "a", "type": { - "type": {} + "type": { + "name": "bool" + } } }, { "index": 1, "name": "b", "type": { - "type": {} + "type": { + "name": "bool" + } } } ]