mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Remove a function that was not really needed.
This commit is contained in:
@@ -476,7 +476,7 @@ class ModuleContext(use_metaclass(CachedMetaClass, context.TreeContext)):
|
||||
modules = []
|
||||
for i in self.tree_node.iter_imports():
|
||||
if i.is_star_import():
|
||||
name = i.star_import_name()
|
||||
name = i.get_paths()[-1][-1]
|
||||
new = imports.infer_import(self, name)
|
||||
for module in new:
|
||||
if isinstance(module, ModuleContext):
|
||||
|
||||
@@ -742,16 +742,12 @@ class ImportFrom(Import):
|
||||
else:
|
||||
yield as_name.children[::2] # yields x, y -> ``x as y``
|
||||
|
||||
def star_import_name(self):
|
||||
"""
|
||||
The last name defined in a star import.
|
||||
"""
|
||||
return self.get_paths()[-1][-1]
|
||||
|
||||
def get_paths(self):
|
||||
"""
|
||||
The import paths defined in an import statement. Typically an array
|
||||
like this: ``[<Name: datetime>, <Name: date>]``.
|
||||
|
||||
:return list of list of Name:
|
||||
"""
|
||||
dotted = self.get_from_names()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user