Mercurial > public > mercurial-scm > hg
diff tests/filterpyflakes.py @ 21293:507ce509fd22
filterpyflakes: make memoryview filtering unconditional
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 13 May 2014 19:22:40 -0500 |
parents | 4adc090fa2fb |
children | 1ae3cd6f836c |
line wrap: on
line diff
--- a/tests/filterpyflakes.py Tue May 13 15:22:36 2014 -0500 +++ b/tests/filterpyflakes.py Tue May 13 19:22:40 2014 -0500 @@ -32,11 +32,10 @@ (r"imported but unused", None), (r"local variable '.*' is assigned to but never used", None), (r"unable to detect undefined names", None), + (r"undefined name '.*'", + r"undefined name 'memoryview'") ] - if sys.version_info >= (2, 7): - pats.append((r"undefined name '.*'", None)) - else: - pats.append((r"undefined name '.*'", r"undefined name 'memoryview'")) + for msgtype, (pat, excl) in enumerate(pats): if re.search(pat, line) and (not excl or not re.search(excl, line)): break # pattern matches