changeset 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 2642ce9be6ef
children da05fe01170b
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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
   [