1. Tarek Ziadé
  2. flake8


Tarek Ziadé  committed f5a4d7b


  • Participants
  • Parent commits ab6dd88
  • Branches default

Comments (0)

Files changed (2)

File flake8/mccabe.py

View file
         """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:

File flake8/pyflakes.py

View file
 # 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)