1
0
forked from VimPlug/jedi

Imports completions after a semicolon work now

This commit is contained in:
Dave Halter
2019-06-02 17:54:00 +02:00
parent c6173efe61
commit 1213b51c66
2 changed files with 12 additions and 1 deletions

View File

@@ -179,7 +179,12 @@ class Completion:
nonterminals = [stack_node.nonterminal for stack_node in stack]
nodes = [node for stack_node in stack for node in stack_node.nodes]
nodes = []
for stack_node in stack:
if stack_node.dfa.from_rule == 'small_stmt':
nodes = []
else:
nodes += stack_node.nodes
if nodes and nodes[-1] in ('as', 'def', 'class'):
# No completions for ``with x as foo`` and ``import x as foo``.