Skip to content

Commit e06f237

Browse files
authored
Merge pull request #691 from plasmashen/plasmashen-patch-1
Update attacked_text.py
2 parents 899ea46 + ef270fc commit e06f237

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

textattack/shared/attacked_text.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ def __eq__(self, other):
9191
elif not (self.attack_attrs[key] == other.attack_attrs[key]).all():
9292
return False
9393
else:
94-
if not self.attack_attrs[key] == other.attack_attrs[key]:
95-
return False
94+
if isinstance(self.attack_attrs[key], AttackedText):
95+
if not self.attack_attrs[key]._text_input == other.attack_attrs[key]._text_input:
96+
return False
9697
return True
9798

9899
def __hash__(self):

0 commit comments

Comments
 (0)