Mercurial > hg
changeset 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 | 14bf7679fb68 |
children | e8348f1cc228 |
files | contrib/check-code.py tests/test-check-code.t |
diffstat | 2 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Thu May 14 09:04:48 2015 +0200 +++ b/contrib/check-code.py Fri May 15 09:54:35 2015 -0500 @@ -217,9 +217,6 @@ (r'(\w|\)),\w', "missing whitespace after ,"), (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 Python 2.4'), (r'(?<!def)(\s+|^|\()next\(.+\)', 'no next(foo) in Python 2.4 and 2.5, use foo.next() instead'), (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?'
--- a/tests/test-check-code.t Thu May 14 09:04:48 2015 +0200 +++ b/tests/test-check-code.t Fri May 15 09:54:35 2015 -0500 @@ -104,9 +104,6 @@ ./non-py24.py:6: > z = next(x) no next(foo) in Python 2.4 and 2.5, use foo.next() instead - ./non-py24.py:18: - > try: - no try/except/finally in Python 2.4 ./non-py24.py:35: > try: no yield inside try/finally in Python 2.4