# HG changeset patch # User Pierre-Yves David # Date 2012-07-06 17:48:19 # Node ID 5f131ae05905a4e88b02c4b5458571db7a775bdf # Parent c1a3b151782a2870769f968a554a371cb2722320 check-code: recognise %= as an operator diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -172,13 +172,13 @@ pypats = [ "gratuitous whitespace after Python keyword"), (r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"), # (r'\s\s=', "gratuitous whitespace before ="), - (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', + (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S', "missing whitespace around operator"), - (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\s', + (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\s', "missing whitespace around operator"), - (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', + (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S', "missing whitespace around operator"), - (r'[^^+=*/!<>&| -](\s=|=\s)[^= ]', + (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]', "wrong whitespace around ="), (r'raise Exception', "don't raise generic exceptions"), (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),