boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!(file instanceof PyFile) || file instanceof PyDocstringFile) { return false; } final List<PyTargetExpression> resolved = findSuitableTargetsUnderCaret(project, editor, file); if (resolved.size() != 1) { return false; } setText(PyPsiBundle.message("INTN.add.type.hint.for.variable", resolved.get(0).getName())); return true; }