Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 25077:68633ff2b608
check-code: drop try/except/finally check
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 15 May 2015 09:54:35 -0500 |
parents | 33298a8b472f |
children | 6d3079e9b53f |
comparison
equal
deleted
inserted
replaced
25076:14bf7679fb68 | 25077:68633ff2b608 |
---|---|
215 (r'[^_]_\([ \t\n]*(?:"[^"]+"[ \t\n+]*)+%', "don't use % inside _()"), | 215 (r'[^_]_\([ \t\n]*(?:"[^"]+"[ \t\n+]*)+%', "don't use % inside _()"), |
216 (r"[^_]_\([ \t\n]*(?:'[^']+'[ \t\n+]*)+%", "don't use % inside _()"), | 216 (r"[^_]_\([ \t\n]*(?:'[^']+'[ \t\n+]*)+%", "don't use % inside _()"), |
217 (r'(\w|\)),\w', "missing whitespace after ,"), | 217 (r'(\w|\)),\w', "missing whitespace after ,"), |
218 (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"), | 218 (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"), |
219 (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"), | 219 (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"), |
220 (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)(\1except.*?:\n' | |
221 r'((?:\n|\1\s.*\n)+?))+\1finally:', | |
222 'no try/except/finally in Python 2.4'), | |
223 (r'(?<!def)(\s+|^|\()next\(.+\)', | 220 (r'(?<!def)(\s+|^|\()next\(.+\)', |
224 'no next(foo) in Python 2.4 and 2.5, use foo.next() instead'), | 221 'no next(foo) in Python 2.4 and 2.5, use foo.next() instead'), |
225 (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?' | 222 (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?' |
226 r'((?:\n|\1\s.*\n)+?)\1finally:', | 223 r'((?:\n|\1\s.*\n)+?)\1finally:', |
227 'no yield inside try/finally in Python 2.4'), | 224 'no yield inside try/finally in Python 2.4'), |