mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-24 17:28:36 +08:00
After as ther should not follow any completions.
This commit is contained in:
@@ -164,6 +164,9 @@ class Completion:
|
|||||||
level,
|
level,
|
||||||
only_modules
|
only_modules
|
||||||
)
|
)
|
||||||
|
elif nodes and nodes[-1] == 'as':
|
||||||
|
# No completions for ``with x as foo`` and ``import x as foo``.
|
||||||
|
return []
|
||||||
else:
|
else:
|
||||||
completion_names += self._simple_complete(completion_parts)
|
completion_names += self._simple_complete(completion_parts)
|
||||||
|
|
||||||
|
|||||||
@@ -25,3 +25,7 @@ a + break
|
|||||||
|
|
||||||
#? ['break']
|
#? ['break']
|
||||||
b; break
|
b; break
|
||||||
|
|
||||||
|
# Should not complete after as.
|
||||||
|
#? []
|
||||||
|
with open() as f
|
||||||
|
|||||||
Reference in New Issue
Block a user