boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!(file instanceof PyFile)) { return false; } IntentionState state = IntentionState.fromContext(editor, file); setText(state.getText()); return state.isAvailable(); }