mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
get_definition on import statements talked about in issue #7
This commit is contained in:
12
evaluate.py
12
evaluate.py
@@ -1443,11 +1443,15 @@ def goto(scopes, search_name=None, statement_path_offset=1):
|
||||
definitions = []
|
||||
for s in scopes:
|
||||
if isinstance(s, imports.ImportPath):
|
||||
s = s.follow()[0]
|
||||
try:
|
||||
s = statement_path[0]
|
||||
except IndexError:
|
||||
pass
|
||||
s = s.follow()[0]
|
||||
except imports.ModuleNotFound:
|
||||
continue
|
||||
else:
|
||||
try:
|
||||
s = statement_path[0]
|
||||
except IndexError:
|
||||
pass
|
||||
definitions.append(s)
|
||||
else:
|
||||
def remove_unreal_imports(names):
|
||||
|
||||
Reference in New Issue
Block a user