1
0
forked from VimPlug/jedi

move is_nested check from evaluate.imports to the parser

This commit is contained in:
Dave Halter
2014-05-12 11:02:57 +02:00
parent 04855e9452
commit 13949ec145
2 changed files with 12 additions and 14 deletions

View File

@@ -776,6 +776,16 @@ class Import(Simple):
n.append(self.alias)
return n
def is_nested(self):
"""
This checks for the special case of nested imports, without aliases and
from statement::
import foo.bar
"""
return not self.alias and not self.from_ns \
and len(self.namespace.names) > 1 \
class KeywordStatement(Base):
"""