Skip to content

Commit 21ac165

Browse files
committed
move __ne__ from base to primitive and transformation
1 parent e11da3a commit 21ac165

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/compas/base.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ def __init__(self):
6363
self._guid = None
6464
self._name = None
6565

66-
def __ne__(self, other):
67-
# this is not obvious to ironpython
68-
return not self.__eq__(other)
69-
7066
@property
7167
def DATASCHEMA(self):
7268
""":class:`schema.Schema` : The schema of the data of this object."""

src/compas/geometry/primitives/_primitive.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ class Primitive(Base):
1818
def __init__(self):
1919
super(Primitive, self).__init__()
2020

21+
def __ne__(self, other):
22+
# this is not obvious to ironpython
23+
return not self.__eq__(other)
24+
2125
@classmethod
2226
def from_json(cls, filepath):
2327
"""Construct a primitive from structured data contained in a json file.

src/compas/geometry/transformations/transformation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ def __eq__(self, other, tol=1e-05):
9797
except BaseException:
9898
return False
9999

100+
def __ne__(self, other):
101+
# this is not obvious to ironpython
102+
return not self.__eq__(other)
103+
100104
def __repr__(self):
101105
return "Transformation({})".format(self.matrix)
102106

0 commit comments

Comments
 (0)