Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 17428:72803c8edaa4
avoid using abbreviations that look like spelling errors
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 27 Aug 2012 23:14:27 +0200 |
parents | e7cfe3587ea4 |
children | efd1a4378b64 |
line wrap: on
line diff
--- a/contrib/check-code.py Tue Aug 21 02:41:20 2012 +0200 +++ b/contrib/check-code.py Mon Aug 27 23:14:27 2012 +0200 @@ -136,7 +136,7 @@ (r'\w[+/*\-<>]\w', "missing whitespace in expression"), (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"), (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n' - r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'), + r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'), (r'.{81}', "line too long"), (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'), (r'[^\n]\Z', "no trailing newline"), @@ -190,8 +190,8 @@ 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), (r'opener\([^)]*\).read\(', "use opener.read() instead"), - (r'BaseException', 'not in Py2.4, use Exception'), - (r'os\.path\.relpath', 'os.path.relpath is not in Py2.5'), + (r'BaseException', 'not in Python 2.4, use Exception'), + (r'os\.path\.relpath', 'os.path.relpath is not in Python 2.5'), (r'opener\([^)]*\).write\(', "use opener.write() instead"), (r'[\s\(](open|file)\([^)]*\)\.read\(',