contrib/check-code.py
changeset 16428 9b26d541e972
parent 16413 1a420761fcb7
parent 16416 c3aedd526d53
child 16483 3c4910364797
--- a/contrib/check-code.py	Fri Apr 13 11:01:07 2012 -0700
+++ b/contrib/check-code.py	Sat Apr 14 01:39:35 2012 -0500
@@ -180,7 +180,7 @@
      "comparison with singleton, use 'is' or 'is not' instead"),
     (r'^\s*(while|if) [01]:',
      "use True/False for constant Boolean expression"),
-    (r'(?<!def)\s+hasattr',
+    (r'(?:(?<!def)\s+|\()hasattr',
      'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'),
     (r'opener\([^)]*\).read\(',
      "use opener.read() instead"),