summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-03-30 00:10:06 +0100
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-03-30 00:10:06 +0100
commit408182df1d1e5079297e4548552eaeaaad367f2c (patch)
treeb90835a7c03087d04cda4abdb37263374a42184d
parent3d54e69e337481970faac3eae60ef35f4cfc6719 (diff)
downloadpyflakes-408182df1d1e5079297e4548552eaeaaad367f2c.tar.gz
Do not report 'unable to detect undefined names' when using invalid syntax 'from __future__ import *
-rw-r--r--pyflakes/checker.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 1c0978c..88a813e 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -827,8 +827,8 @@ class Checker(object):
if not self.futuresAllowed:
self.report(messages.LateFutureImport,
node, [n.name for n in node.names])
- else:
- self.futuresAllowed = False
+ return
+ self.futuresAllowed = False
for alias in node.names:
if alias.name == '*':