Adding a wrapper around pyflakes to filter out warnings which have been inspected and should be ignored.
- Legacy-Id: 249
This commit is contained in:
parent
8b17a99d22
commit
edc55bcf05
11
test/pyflakes.exclude
Normal file
11
test/pyflakes.exclude
Normal file
|
@ -0,0 +1,11 @@
|
|||
ietf/settings.py:144: 'from settings_local import *' used; unable to detect undefined names
|
||||
ietf/tests.py:8: redefinition of unused 'ietf' from line 7
|
||||
ietf/urls.py:1: 'handler500' imported but unused
|
||||
ietf/urls.py:1: 'handler404' imported but unused
|
||||
ietf/ipr/views.py:6: 'new' imported but unused
|
||||
ietf/contrib/__init__.py:1: 'form_decorator' imported but unused
|
||||
ietf/utils/__init__.py:1: 'flattenl' imported but unused
|
||||
ietf/utils/__init__.py:1: 'orl' imported but unused
|
||||
ietf/utils/__init__.py:2: 'log' imported but unused
|
||||
ietf/utils/__init__.py:3: 'FKAsOneToOne' imported but unused
|
||||
ietf/idtracker/templatetags/ietf_filters.py:8: redefinition of unused 'emailutils' from line 6
|
14
test/run-pyflakes
Executable file
14
test/run-pyflakes
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
function filter() {
|
||||
python -c '
|
||||
import sys
|
||||
file = open(sys.argv[1])
|
||||
excludes = [line.strip() for line in file.readlines()]
|
||||
for line in sys.stdin:
|
||||
if not line.strip() in excludes:
|
||||
sys.stdout.write(line)
|
||||
' "$@"
|
||||
}
|
||||
|
||||
pyflakes "$@" | filter "${0%/*}/pyflakes.exclude"
|
Loading…
Reference in a new issue