>+ # Why re-fetch the rules here? This way we get them reformatted
>+ # (whitespace normalized) and ordered consistently so the diff is
>+ # minimal.
>+ diff = '\n'.join(self.diff_rules(original_rules,
>+ self.request.features.rule_source.getAllRulesAsText()))
This formatting is hard to read and nonstandard. You could reformat like the following to comply with the style guide, but it would probably be more readable if you put the rules into a variable, so that the join() fits on one line.
>+ # Why re-fetch the rules here? This way we get them reformatted self.diff_ rules(original_ rules, features. rule_source. getAllRulesAsTe xt()))
>+ # (whitespace normalized) and ordered consistently so the diff is
>+ # minimal.
>+ diff = '\n'.join(
>+ self.request.
This formatting is hard to read and nonstandard. You could reformat like the following to comply with the style guide, but it would probably be more readable if you put the rules into a variable, so that the join() fits on one line.
diff = '\n'.join( self.diff_ rules(
original_ rules,
self. request. features. rule_source. getAllRulesAsTe xt()))
Everything else looks good.