Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _excavate_sibling_rivalries(self):
"""Recognize cases where mutual animosity exists between a pair of siblings."""
sibling_rivalries = []
for person in self.simulation.town.residents:
for sibling in person.siblings:
if person.dislikes(sibling) and sibling.dislikes(person):
subjects = (person, sibling)
if not any(sr for sr in self.sibling_rivalries if set(sr.subjects) == set(subjects)):
sibling_rivalries.append(SiblingRivalry(subjects=subjects))
return sibling_rivalries