def validate(self, option_dict): found = set(self._option_name_list) & set(option_dict.keys()) if len(found) > 1: return [ reports.mutually_exclusive_options( found, self._option_type, ) ] return []
def validate(option_dict): found_names = set.intersection(set(option_dict.keys()), set(mutually_exclusive_names)) if len(found_names) > 1: return [ reports.mutually_exclusive_options( sorted(found_names), option_type, ) ] return []
def validate(option_dict): found_names = set.intersection( set(option_dict.keys()), set(mutually_exclusive_names) ) if len(found_names) > 1: return [reports.mutually_exclusive_options( sorted(found_names), option_type, )] return []