diff contrib/check-code.py @ 22448:8afaf7cef35a

check-code: look for misuse of __bool__
author Yuya Nishihara <yuya@tcha.org>
date Wed, 17 Sep 2014 00:28:37 +0900
parents 2965804483e3
children 22e76e370611
line wrap: on
line diff
--- a/contrib/check-code.py	Wed Sep 17 00:31:03 2014 +0900
+++ b/contrib/check-code.py	Wed Sep 17 00:28:37 2014 +0900
@@ -299,6 +299,7 @@
     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
      "missing _() in ui message (use () to hide false-positives)"),
     (r'release\(.*wlock, .*lock\)', "wrong lock release order"),
+    (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"),
   ],
   # warnings
   [