Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 12964:34034e55424f
check-code: using and/or/not as a function is bad style
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 11 Nov 2010 00:08:09 +0100 |
parents | c7d23b4ca4ba |
children | 8b167ee8242f |
line wrap: on
line diff
--- a/contrib/check-code.py Wed Nov 10 15:44:19 2010 +0100 +++ b/contrib/check-code.py Thu Nov 11 00:08:09 2010 +0100 @@ -118,6 +118,9 @@ "linebreak after :"), (r'class\s[^(]:', "old-style class, use class foo(object)"), (r'^\s+del\(', "del isn't a function"), + (r'\band\(', "and isn't a function"), + (r'\bor\(', "or isn't a function"), + (r'\bnot\(', "not isn't a function"), (r'^\s+except\(', "except isn't a function"), (r',]', "unneeded trailing ',' in list"), # (r'class\s[A-Z][^\(]*\((?!Exception)',