[tor-commits] [stem/master] Style checks accidently clobbered 'path'

atagar at torproject.org atagar at torproject.org
Thu Jan 2 02:04:05 UTC 2014


commit f0a9211a8eae41c674d58d5bea41eefb4eed7969
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Jan 1 13:06:06 2014 -0800

    Style checks accidently clobbered 'path'
    
    Oops, we used the 'path' variable a little name overwriting it from the outer
    scope. This in turn likely broke our custom style checks making them apply to
    just the last PEP8 match rather than the full directory.
---
 test/util.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/util.py b/test/util.py
index 9ff6e99..c10a88e 100644
--- a/test/util.py
+++ b/test/util.py
@@ -250,10 +250,10 @@ def get_stylistic_issues(paths):
       line_match = re.match("^(.*):(\d+):(\d+): (.*)$", line)
 
       if line_match:
-        path, line, _, issue = line_match.groups()
+        file_path, line, _, issue = line_match.groups()
 
-        if not _is_test_data(path):
-          issues.setdefault(path, []).append((int(line), issue))
+        if not _is_test_data(file_path):
+          issues.setdefault(file_path, []).append((int(line), issue))
 
     for file_path in _get_files_with_suffix(path):
       if _is_test_data(file_path):





More information about the tor-commits mailing list