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_extramarital_romantic_interests(self):
"""Excavate cases where married characters are in love with people they are not married to."""
extramarital_romantic_interests = []
for person in self.simulation.town.residents:
if person.spouse and person.love_interest is not person.spouse:
subjects = (person, person.love_interest)
extramarital_romantic_interests.append(ExtramaritalRomanticInterest(subjects=subjects))
return extramarital_romantic_interests