Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 18183:e1caaeb5a2ed
check-code: disallow defunct <> operator
Added a test for that and one other python3 check in
test-check-code.t.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 01 Jan 2013 13:05:22 -0600 |
parents | c582a71457e5 |
children | 813b7a1f7036 |
line wrap: on
line diff
--- a/contrib/check-code.py Tue Jan 01 13:04:40 2013 -0600 +++ b/contrib/check-code.py Tue Jan 01 13:05:22 2013 -0600 @@ -129,6 +129,7 @@ (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"), (r'\breduce\s*\(.*', "reduce is not available in Python 3+"), (r'\.has_key\b', "dict.has_key is not available in Python 3+"), + (r'\s<>\s', '<> operator is not available in Python 3+, use !='), (r'^\s*\t', "don't use tabs"), (r'\S;\s*\n', "semicolon"), (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"),