changeset 32543:50eaccb8353f

filterpyflakes: allow reexporting pure symbols from cffi modules cffi modules will do 'from ..pure.<module> import *'.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 28 May 2017 17:36:01 +0900
parents a025ec43856c
children 2e431fb98c6b
files tests/filterpyflakes.py tests/test-check-pyflakes.t
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/filterpyflakes.py	Tue May 02 22:28:18 2017 +0900
+++ b/tests/filterpyflakes.py	Sun May 28 17:36:01 2017 +0900
@@ -13,6 +13,9 @@
     pats = [
         r"undefined name 'WindowsError'",
         r"redefinition of unused '[^']+' from line",
+        # for cffi, allow re-exports from pure.*
+        r"cffi/[^:]*:.*\bimport \*' used",
+        r"cffi/[^:]*:.*\*' imported but unused",
     ]
 
     keep = True
--- a/tests/test-check-pyflakes.t	Tue May 02 22:28:18 2017 +0900
+++ b/tests/test-check-pyflakes.t	Sun May 28 17:36:01 2017 +0900
@@ -10,5 +10,5 @@
   > -X mercurial/pycompat.py -X contrib/python-zstandard \
   > 2>/dev/null \
   > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
-  tests/filterpyflakes.py:38: undefined name 'undefinedname'
+  tests/filterpyflakes.py:41: undefined name 'undefinedname'