Skip to content

Commit

Permalink
Fixed py/missing-equals alert in LGTM.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngnpope committed Mar 30, 2021
1 parent 65469c8 commit 2fb09d2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions soapfish/xsd.py
Expand Up @@ -765,6 +765,11 @@ def append(self, value):
raise ValueError(f'You must not add more than {self._list._maxOccurs} items to this list.')
super().append(accepted_value)

def __eq__(self, other):
if not isinstance(other, TypedList):
return False
return self._list == other._list and super().__eq__(other)


class ListElement(Element):
"""
Expand Down Expand Up @@ -1195,3 +1200,8 @@ class NamedType(ComplexType):
def __init__(self, name=None, value=None):
self.name = name
self.value = value

def __eq__(self, other):
if not isinstance(other, NamedType):
return False
return self.name == other.name and self.value == other.value and super().__eq__(other)

0 comments on commit 2fb09d2

Please sign in to comment.