mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +08:00
Fixed an issue with error nodes and completion in more complex settings.
This commit is contained in:
@@ -102,7 +102,12 @@ def call_of_leaf(leaf, cut_own_trailer=False):
|
||||
power.children[cut:] = []
|
||||
|
||||
if power.type == 'error_node':
|
||||
transformed = tree.Node('power', power.children)
|
||||
start = index
|
||||
while True:
|
||||
start -= 1
|
||||
if power.children[start].type != 'trailer':
|
||||
break
|
||||
transformed = tree.Node('power', power.children[start:])
|
||||
transformed.parent = power.parent
|
||||
return transformed
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ def scope_nested():
|
||||
|
||||
#? float()
|
||||
import_tree.pkg.mod1.a
|
||||
#? ['a', '__name__', '__package__', '__file__', '__doc__']
|
||||
a = import_tree.pkg.mod1.
|
||||
|
||||
import import_tree.random
|
||||
#? set
|
||||
|
||||
Reference in New Issue
Block a user