def __general_conditions(self, mail: Mail):
    return (any((re.search(keyword, mail.subject.lower()) for keyword in self.general_keywords)) or any((re.search(keyword, mail.body.lower()) for keyword in self.general_keywords)) or any((re.search(keyword, name.lower()) for (name, _) in mail.attachments.items() for keyword in self.general_keywords)))
def __general_conditions(self, mail: Mail):
    return (any((re.search(keyword, mail.subject.lower()) for keyword in self.general_keywords)) or any((re.search(keyword, mail.body.lower()) for keyword in self.general_keywords)) or any((re.search(keyword, name.lower()) for (name, _) in mail.attachments.items() for keyword in self.general_keywords)))