void () { extend( CompletionType.BASIC, psiElement() .withLanguage(PythonLanguage.getInstance()) .andNot(IN_COMMENT) .andNot(IN_IMPORT_STMT) .and(NOT_PARAMETER_OR_DEFAULT_VALUE) .andNot(AFTER_QUALIFIER) .andNot(IN_FUNCTION_HEADER) .andNot(IN_STRING_LITERAL) .andNot(TARGET_AFTER_QUALIFIER) , new PyKeywordCompletionProvider(TailTypes.noneType(), PyNames.TRUE, PyNames.FALSE, PyNames.NONE)); extend(CompletionType.BASIC, psiElement() .withLanguage(PythonLanguage.getInstance()) .and(PY35) .andNot(IN_COMMENT) .andNot(IN_IMPORT_STMT) .andNot(IN_PARAM_LIST) .andNot(AFTER_QUALIFIER) .andNot(IN_STRING_LITERAL) .andNot(TARGET_AFTER_QUALIFIER) .andNot(IN_PATTERN), new PyKeywordCompletionProvider(PyNames.ASYNC)); extend(CompletionType.BASIC, psiElement() .withLanguage(PythonLanguage.getInstance()) .and(PY35) .afterLeaf(psiElement().withElementType(PyTokenTypes.IDENTIFIER).withText(PyNames.ASYNC)), new PyKeywordCompletionProvider(PyNames.DEF, PyNames.WITH, PyNames.FOR)); extend(CompletionType.BASIC, psiElement() .withLanguage(PythonLanguage.getInstance()) .and(IN_ANNOTATION), new PyKeywordCompletionProvider(TailTypes.noneType(), PyNames.NONE)); }