Mercurial > hg
annotate tests/filterpyflakes.py @ 14141:bd1cbfe5db5c
bundler: make parsechunk return the base revision of the delta
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 30 Apr 2011 10:00:41 +0200 |
parents | 82f0412ef7de |
children | 419539ea79cb |
rev | line source |
---|---|
14140
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
2 |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
3 # Filter output by pyflakes to control which warnings we check |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
4 |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
5 import sys, re |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
6 |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
7 for line in sys.stdin: |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
8 # We whitelist tests |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
9 if not re.search("imported but unused", line): |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
10 continue |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
11 sys.stdout.write(line) |
82f0412ef7de
tests: add pyflakes checking for unused imports
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
12 print |