mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-17 19:15:55 +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:] = []
|
power.children[cut:] = []
|
||||||
|
|
||||||
if power.type == 'error_node':
|
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
|
transformed.parent = power.parent
|
||||||
return transformed
|
return transformed
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ def scope_nested():
|
|||||||
|
|
||||||
#? float()
|
#? float()
|
||||||
import_tree.pkg.mod1.a
|
import_tree.pkg.mod1.a
|
||||||
|
#? ['a', '__name__', '__package__', '__file__', '__doc__']
|
||||||
|
a = import_tree.pkg.mod1.
|
||||||
|
|
||||||
import import_tree.random
|
import import_tree.random
|
||||||
#? set
|
#? set
|
||||||
|
|||||||
Reference in New Issue
Block a user