ThreeState (@NotNull PsiElement contextElement, @NotNull PsiFile psiFile, int offset) { final ASTNode node = contextElement.getNode(); if (node != null) { final IElementType elementType = node.getElementType(); if (elementType == PyTokenTypes.FLOAT_LITERAL || elementType == PyTokenTypes.INTEGER_LITERAL) { return ThreeState.YES; } if (isSequenceOfDots(contextElement)) { return ThreeState.YES; } if (elementType == PyTokenTypes.FSTRING_START) { return ThreeState.YES; } if (PyTokenTypes.STRING_NODES.contains(elementType)) { final PyStringElement stringElement = as(contextElement, PyStringElement.class); if (stringElement != null) { final int relativeOffset = offset - stringElement.getTextRange().getStartOffset(); if (relativeOffset < stringElement.getContentRange().getStartOffset()) { return ThreeState.YES; } } } } return super.shouldSkipAutopopup(contextElement, psiFile, offset); }