Remove less-than check from Position

This commit is contained in:
Arjan Molenaar 2021-11-23 15:43:07 +01:00
parent b382e3d080
commit ca0366e867
No known key found for this signature in database
GPG Key ID: BF977B918996CB13
2 changed files with 0 additions and 9 deletions

View File

@ -104,9 +104,6 @@ class Position:
def __eq__(self, other):
return isinstance(other, Position) and self.x == other.x and self.y == other.y
def __lt__(self, other):
return self[0] < other[0] and self[1] < other[1]
class MatrixProjection(BaseConstraint):
def __init__(self, pos: Position, matrix: Matrix):

View File

@ -17,12 +17,6 @@ def test_position(position):
assert position[1] == pos.y
def test_position_can_compare_with_tuple():
pos = Position(3, 3)
assert pos < (4, 4)
def test_position_notifies_on_x_change(handler):
pos = Position(3, 3)
pos.add_handler(handler)