##// END OF EJS Templates
check-code: extend try/except/finally check for multiple except clauses
Matt Mackall -
r22175:29658044 default
parent child Browse files
Show More
@@ -216,8 +216,9 b' pypats = ['
216 (r'(\w|\)),\w', "missing whitespace after ,"),
216 (r'(\w|\)),\w', "missing whitespace after ,"),
217 (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"),
217 (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"),
218 (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),
218 (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),
219 (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
219 (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)(\1except.*?:\n'
220 r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'),
220 r'((?:\n|\1\s.*\n)+?))+\1finally:',
221 'no try/except/finally in Python 2.4'),
221 (r'(?<!def)(\s+|^|\()next\(.+\)',
222 (r'(?<!def)(\s+|^|\()next\(.+\)',
222 'no next(foo) in Python 2.4 and 2.5, use foo.next() instead'),
223 'no next(foo) in Python 2.4 and 2.5, use foo.next() instead'),
223 (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?'
224 (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?'
General Comments 0
You need to be logged in to leave comments. Login now