@staticmethod
    def from_rule_list(rule_list):
        rules = []
        for rule_string in rule_list:
            rule_string = rule_string.strip()
            rule_comps = rule_string.split()
            match_action_string = rule_comps[0]
            if match_action_string == '+':
                match_action = Match.ACCEPT
            elif match_action_string == '-':
                match_action = Match.REJECT
            else:
                raise ValueError("unknown match type: %s" %
                                 (match_action_string))
            pattern = string.join(rule_comps[1:], ' ')
            rules.append(PathFilter.Rule(pattern, match_action))
        return PathFilter(rules)
Read from a dict. `version` is ignored
dataset/ETHPy150Open mindsnacks/Zinc/src/zinc/pathfilter.py/PathFilter.from_rule_list