Collection<PsiReference> (@NotNull PsiElement target, @NotNull SearchScope searchScope) { if (target instanceof PyImportedModule) { target = ((PyImportedModule) target).resolve(); } if (target instanceof PyFile && PyNames.INIT_DOT_PY.equals(((PyFile)target).getName())) { List<PsiReference> result = new ArrayList<>(super.findReferencesToHighlight(target, searchScope)); PsiElement targetDir = PyUtil.turnInitIntoDir(target); if (targetDir != null) { result.addAll(ReferencesSearch.search(targetDir, searchScope, false).findAll()); } return result; } return super.findReferencesToHighlight(target, searchScope); }