[tor-commits] [stem/master] Style issues suppressed pyflakes results

atagar at torproject.org atagar at torproject.org
Sun Jan 5 22:38:16 UTC 2014


commit 46bfcad588b7e41cff109d72ea7a88717beb2c00
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Jan 5 11:05:27 2014 -0800

    Style issues suppressed pyflakes results
    
    When both pyflakes and pep8 reported issues about a file the pep8 results
    clobbered the pyflakes output. Properly combining the two instead.
---
 run_tests.py |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index 664df35..90493da 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -293,12 +293,16 @@ def main():
     static_check_issues = {}
 
     if pyflakes_task and pyflakes_task.is_successful:
-      static_check_issues.update(pyflakes_task.result)
+      for path, issues in pyflakes_task.result.items():
+        for issue in issues:
+          static_check_issues.setdefault(path, []).append(issue)
     elif not test.util.is_pyflakes_available():
       println("Static error checking requires pyflakes version 0.7.3 or later. Please install it from ...\n  http://pypi.python.org/pypi/pyflakes\n", ERROR)
 
     if pep8_task and pep8_task.is_successful:
-      static_check_issues.update(pep8_task.result)
+      for path, issues in pep8_task.result.items():
+        for issue in issues:
+          static_check_issues.setdefault(path, []).append(issue)
     elif not test.util.is_pep8_available():
       println("Style checks require pep8 version 1.4.2 or later. Please install it from...\n  http://pypi.python.org/pypi/pep8\n", ERROR)
 



More information about the tor-commits mailing list