contrib/check-code.py
changeset 14494 1ffeeb91c55d
parent 14303 e2be0bba0d83
child 14549 48ec0763afbb
--- a/contrib/check-code.py	Tue May 31 20:39:04 2011 -0500
+++ b/contrib/check-code.py	Wed Jun 01 12:38:46 2011 +0200
@@ -163,6 +163,8 @@
     (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),
     (r' [=!]=\s+(True|False|None)',
      "comparison with singleton, use 'is' or 'is not' instead"),
+    (r'^\s*(while|if) [01]:',
+     "use True/False for constant Boolean expression"),
     (r'opener\([^)]*\).read\(',
      "use opener.read() instead"),
     (r'opener\([^)]*\).write\(',