Tarek Ziadé avatar Tarek Ziadé committed f5a4d7b


Comments (0)

Files changed (2)

         """Do preorder walk of tree using visitor"""
         self.visitor = visitor
         visitor.visit = self.dispatch
-        self.dispatch(tree, *args) # XXX *args make sense?
+        self.dispatch(tree, *args)  # XXX *args make sense?
 class PathNode:


 # See LICENSE file for details
-    import __builtin__
+    import __builtin__      # NOQA
 except ImportError:
     import builtins as __builtin__
 import os.path
 import _ast
-import sys
 from flake8 import messages
 from flake8.util import skip_warning
                 Check to see if any assignments have not been used.
                 for name, binding in self.scope.items():
-                    try:
-                        if (not binding.used and not name in self.scope.globals
+                    if (not binding.used and not name in self.scope.globals
                         and isinstance(binding, Assignment)):
-                            self.report(messages.UnusedVariable,
-                                    binding.source.lineno, name)
-                    except:
-                        raise Exception(binding)
-                        import pdb; pdb.set_trace()
+                        self.report(messages.UnusedVariable,
+                                binding.source.lineno, name)
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.