Ian Cordasco avatar Ian Cordasco committed a459f61

Two problems I didn't see before that are now fixed.

First, I never got around to testing my changes to @kilian's patch for #23 and
just found that I had mistyped a variable.

Also, on more complex code that what I had tested on previously, my patch to
pep8 was insufficient. This should work without error now.

Comments (0)

Files changed (2)

         print(">>> " + tokens[0][4].rstrip())
 
     for token_type, text, start, end, line in tokens:
+        if line.strip().lower().endswith('# nopep8'):
+            continue
+
         newline = row < start[0] - first_row
         if newline:
             row = start[0] - first_row
         self.line_number += 1
         if self.line_number > len(self.lines):
             return ''
-        line = self.lines[self.line_number - 1]
-        return '' if line.lower().strip().endswith('# nopep8') else line
+        return self.lines[self.line_number - 1]
 
     def readline_check_physical(self):
         """
                         yield fullpath
 
         else:
-            if not skip_file(path) or pep8style.excluded(fullpath):
+            if not skip_file(path) or pep8style.excluded(path):
                 yield path
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.