Skip to content

Commit

Permalink
Merge pull request #691 from plasmashen/plasmashen-patch-1
Browse files Browse the repository at this point in the history
Update attacked_text.py
  • Loading branch information
jxmorris12 committed Sep 23, 2022
2 parents 899ea46 + ef270fc commit e06f237
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions textattack/shared/attacked_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ def __eq__(self, other):
elif not (self.attack_attrs[key] == other.attack_attrs[key]).all():
return False
else:
if not self.attack_attrs[key] == other.attack_attrs[key]:
return False
if isinstance(self.attack_attrs[key], AttackedText):
if not self.attack_attrs[key]._text_input == other.attack_attrs[key]._text_input:
return False
return True

def __hash__(self):
Expand Down

0 comments on commit e06f237

Please sign in to comment.