diff --git a/flake8/mccabe.py b/flake8/mccabe.py index 5e55f2f..3623db6 100644 --- a/flake8/mccabe.py +++ b/flake8/mccabe.py @@ -57,7 +57,7 @@ class PathNode: self.look = look def to_dot(self): - print('node [shape=%s,label="%s"] %d;' % \ + print('node [shape=%s,label="%s"] %d;' % (self.look, self.name, self.dot_id())) def dot_id(self): diff --git a/flake8/pep8.py b/flake8/pep8.py index d09d878..7150fb1 100644 --- a/flake8/pep8.py +++ b/flake8/pep8.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# flake8: noqa # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006 Johann C. Rocholl # diff --git a/flake8/pyflakes.py b/flake8/pyflakes.py index 98100ae..4705224 100644 --- a/flake8/pyflakes.py +++ b/flake8/pyflakes.py @@ -366,7 +366,7 @@ class Checker(object): existing = scope.get(value.name) if (isinstance(existing, Importation) and not existing.used - and (not isinstance(value, Importation) \ + and (not isinstance(value, Importation) or value.fullName == existing.fullName) and reportRedef): self.report(messages.RedefinedWhileUnused,