Mercurial > public > mercurial-scm > hg
diff contrib/check-code.py @ 20870:6500a2eebee8
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 01 Apr 2014 15:11:19 -0500 |
parents | 131f7fe06e9e 9658a79968c6 |
children | e8ef59b351c3 |
line wrap: on
line diff
--- a/contrib/check-code.py Wed Mar 19 23:04:03 2014 -0700 +++ b/contrib/check-code.py Tue Apr 01 15:11:19 2014 -0500 @@ -207,8 +207,8 @@ (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 _()"), - (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"), + (r'[^_]_\((?:"[^"]+"[ \t\n+]*)+%', "don't use % inside _()"), + (r"[^_]_\((?:'[^']+'[ \t\n+]*)+%", "don't use % inside _()"), (r'(\w|\)),\w', "missing whitespace after ,"), (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"), (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),