comparison tests/filterpyflakes.py @ 32510: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 80e3002cd29e
children 6029939f7e98
comparison
equal deleted inserted replaced
32509:a025ec43856c 32510:50eaccb8353f
11 for line in sys.stdin: 11 for line in sys.stdin:
12 # We blacklist tests that are too noisy for us 12 # We blacklist tests that are too noisy for us
13 pats = [ 13 pats = [
14 r"undefined name 'WindowsError'", 14 r"undefined name 'WindowsError'",
15 r"redefinition of unused '[^']+' from line", 15 r"redefinition of unused '[^']+' from line",
16 # for cffi, allow re-exports from pure.*
17 r"cffi/[^:]*:.*\bimport \*' used",
18 r"cffi/[^:]*:.*\*' imported but unused",
16 ] 19 ]
17 20
18 keep = True 21 keep = True
19 for pat in pats: 22 for pat in pats:
20 if re.search(pat, line): 23 if re.search(pat, line):