We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 899ea46 + ef270fc commit e06f237Copy full SHA for e06f237
1 file changed
textattack/shared/attacked_text.py
@@ -91,8 +91,9 @@ def __eq__(self, other):
91
elif not (self.attack_attrs[key] == other.attack_attrs[key]).all():
92
return False
93
else:
94
- if not self.attack_attrs[key] == other.attack_attrs[key]:
95
- return False
+ if isinstance(self.attack_attrs[key], AttackedText):
+ if not self.attack_attrs[key]._text_input == other.attack_attrs[key]._text_input:
96
+ return False
97
return True
98
99
def __hash__(self):
0 commit comments