check-code: recognise %= as an operator
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 06 Jul 2012 19:48:19 +0200
changeset 17167 5f131ae05905
parent 17166 c1a3b151782a
child 17168 e058f4eec69c
check-code: recognise %= as an operator
contrib/check-code.py
--- a/contrib/check-code.py	Wed Jul 04 08:55:16 2012 +0200
+++ b/contrib/check-code.py	Fri Jul 06 19:48:19 2012 +0200
@@ -172,13 +172,13 @@
      "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"),