List<PyFile> (@NotNull String shortName, @NotNull Project project, @NotNull GlobalSearchScope scope) { final List<PyFile> results = new ArrayList<>(); final Collection<VirtualFile> files = FileBasedIndex.getInstance().getContainingFiles(NAME, shortName, scope); for (VirtualFile virtualFile : files) { final PsiFile psiFile = PsiManager.getInstance(project).findFile(virtualFile); if (psiFile instanceof PyFile) { results.add((PyFile)psiFile); } } return results; }