tests/filterpyflakes.py
changeset 28724 cf339d6ac7c7
parent 27285 aef5b606d3ee
child 30394 046a7e828ea6
equal deleted inserted replaced
28723:18e738038d78 28724:cf339d6ac7c7
     1 #!/usr/bin/env python
     1 #!/usr/bin/env python
     2 
     2 
     3 # Filter output by pyflakes to control which warnings we check
     3 # Filter output by pyflakes to control which warnings we check
     4 
     4 
     5 from __future__ import absolute_import
     5 from __future__ import absolute_import, print_function
     6 
     6 
     7 import re
     7 import re
     8 import sys
     8 import sys
     9 
     9 
    10 def makekey(typeandline):
    10 def makekey(typeandline):
    52         continue
    52         continue
    53     lines.append((msgtype, line))
    53     lines.append((msgtype, line))
    54 
    54 
    55 for msgtype, line in sorted(lines, key=makekey):
    55 for msgtype, line in sorted(lines, key=makekey):
    56     sys.stdout.write(line)
    56     sys.stdout.write(line)
    57 print
    57 print()
    58 
    58 
    59 # self test of "undefined name" detection for other than 'memoryview'
    59 # self test of "undefined name" detection for other than 'memoryview'
    60 if False:
    60 if False:
    61     print undefinedname
    61     print(undefinedname)