[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Only note style check content when there's something to show



commit c30362a4a5074d5fc6f97a79eff09a6fe7d94290
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Thu Nov 12 09:35:30 2015 -0800

    Only note style check content when there's something to show
    
    While making changes I got a bunch of...
    
      line 57   - W391 blank line at end of file           ()
    
    While it's not wrong I find the brackets annoying. Only providing the content
    if we're showing something, and using a pipe as a separator instead.
---
 run_tests.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/run_tests.py b/run_tests.py
index 91c0adf..431a961 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -326,7 +326,8 @@ def _print_static_issues(static_check_issues):
       for line_number in sorted(line_to_issues.keys()):
         for msg, line in line_to_issues[line_number]:
           line_count = '%-4s' % line_number
-          println('  line %s - %-40s (%s)' % (line_count, msg, line.strip()))
+          content = ' | %s' % line.strip() if line.strip() else ''
+          println('  line %s - %-40s%s' % (line_count, msg, content))
 
       println()
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits