'Add a rule such as ColorScaleRule, FormulaRule or CellIsRule
The priority will be added automatically.'

def add(self, range_string, cfRule):

    if (not isinstance(cfRule, Rule)):
        raise ValueError('Only    instances    of    openpyxl.formatting.rule.Rule    may    be    added')
    rule = cfRule
    self.max_priority += 1
    rule.priority = self.max_priority
    self.cf_rules.setdefault(range_string, []).append(rule)
