1
0
forked from VimPlug/jedi

First imports are working with goto.

This commit is contained in:
Dave Halter
2014-09-19 01:21:17 +02:00
parent 610b2fc832
commit 83d2af5138
3 changed files with 36 additions and 3 deletions

View File

@@ -840,6 +840,28 @@ class Import(Simple):
n.append(self.alias)
return n
def get_all_import_name_parts(self):
"""
TODO refactor and use this method, because NamePart will not exist in
the future.
"""
n = []
if self.from_ns:
n += self.from_ns.names
if self.namespace:
n += self.namespace.names
if self.alias:
n += self.alias.names
return n
@property
def alias_name_part(self):
"""
TODO refactor and dont use this method, because NamePart will not exist in
the future.
"""
return self.alias.names[0] if self.alias else None
def is_nested(self):
"""
This checks for the special case of nested imports, without aliases and