mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +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 = []
|
modules = []
|
||||||
for i in self.tree_node.iter_imports():
|
for i in self.tree_node.iter_imports():
|
||||||
if i.is_star_import():
|
if i.is_star_import():
|
||||||
name = i.star_import_name()
|
name = i.get_paths()[-1][-1]
|
||||||
new = imports.infer_import(self, name)
|
new = imports.infer_import(self, name)
|
||||||
for module in new:
|
for module in new:
|
||||||
if isinstance(module, ModuleContext):
|
if isinstance(module, ModuleContext):
|
||||||
|
|||||||
@@ -742,16 +742,12 @@ class ImportFrom(Import):
|
|||||||
else:
|
else:
|
||||||
yield as_name.children[::2] # yields x, y -> ``x as y``
|
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):
|
def get_paths(self):
|
||||||
"""
|
"""
|
||||||
The import paths defined in an import statement. Typically an array
|
The import paths defined in an import statement. Typically an array
|
||||||
like this: ``[<Name: datetime>, <Name: date>]``.
|
like this: ``[<Name: datetime>, <Name: date>]``.
|
||||||
|
|
||||||
|
:return list of list of Name:
|
||||||
"""
|
"""
|
||||||
dotted = self.get_from_names()
|
dotted = self.get_from_names()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user