completion for 'nonlocal' keyword (PY-2289)

This commit is contained in:
Dmitry Jemerov
2010-11-19 19:43:10 +03:00
parent 7efd446ebc
commit 75ffc7cf72
3 changed files with 15 additions and 0 deletions
@@ -446,6 +446,17 @@ public class PyKeywordCompletionContributor extends PySeeingOriginalCompletionCo
,
new PyKeywordCompletionProvider("global", "return", "yield")
);
extend(
CompletionType.BASIC, psiElement()
.withLanguage(PythonLanguage.getInstance())
.and(IN_DEF_BODY)
.and(IN_BEGIN_STMT)
.and(PY3K)
.andNot(AFTER_QUALIFIER)
,
new PyKeywordCompletionProvider("nonlocal")
);
}
private void addWithinIf() {
@@ -0,0 +1,2 @@
def foo():
nonlocal # foo
+2
View File
@@ -0,0 +1,2 @@
def foo():
nonl<caret> # foo