mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
completion for 'nonlocal' keyword (PY-2289)
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,2 @@
|
||||
def foo():
|
||||
nonl<caret> # foo
|
||||
Reference in New Issue
Block a user