1
0
forked from VimPlug/jedi

After as ther should not follow any completions.

This commit is contained in:
Dave Halter
2016-06-06 18:08:45 +02:00
parent a74d3d6e9a
commit 028d0a2509
2 changed files with 7 additions and 0 deletions

View File

@@ -164,6 +164,9 @@ class Completion:
level,
only_modules
)
elif nodes and nodes[-1] == 'as':
# No completions for ``with x as foo`` and ``import x as foo``.
return []
else:
completion_names += self._simple_complete(completion_parts)

View File

@@ -25,3 +25,7 @@ a + break
#? ['break']
b; break
# Should not complete after as.
#? []
with open() as f