summaryrefslogtreecommitdiff
path: root/checkers/variables.py
diff options
context:
space:
mode:
authorMichal Nowikowski <godfryd@gmail.com>2014-08-04 17:27:35 +0200
committerMichal Nowikowski <godfryd@gmail.com>2014-08-04 17:27:35 +0200
commit05126f2c2247eca98cdc8877b24f9bc6d71c5e69 (patch)
tree2b8ed39594ee1e7c8ff7db9ec0b8ede40072336e /checkers/variables.py
parentaac4a8d4a2cebaaac933d5130fdebe42773be6df (diff)
downloadpylint-git-05126f2c2247eca98cdc8877b24f9bc6d71c5e69.tar.gz
Fix for wired case with import from stmt.
--HG-- branch : fix-293
Diffstat (limited to 'checkers/variables.py')
-rw-r--r--checkers/variables.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/checkers/variables.py b/checkers/variables.py
index b2f27dee3..9f1c52f79 100644
--- a/checkers/variables.py
+++ b/checkers/variables.py
@@ -326,7 +326,7 @@ builtins. Remember that you should avoid to define new builtins when possible.'
imported_name = stmt.names[0][0] # this is: 'import imported_name' or 'from something import imported_name'
as_name = stmt.names[0][1] # this is: 'import imported_name as as_name'
- if isinstance(stmt, astroid.Import):
+ if isinstance(stmt, astroid.Import) or (isinstance(stmt, astroid.From) and not stmt.modname):
if as_name is None:
msg = "import %s" % imported_name
else: