/** @deprecated use {@link #multiResolveImportElement(PyImportElement, QualifiedName)} instead. */ @Deprecated @Nullable public static PsiElement resolveImportElement( PyImportElement importElement, @NotNull final QualifiedName qName) { final List<RatedResolveResult> resultList = RatedResolveResult.sorted(multiResolveImportElement(importElement, qName)); return resultList.size() > 0 ? resultList.get(0).getElement() : null; }
/** * @deprecated Use {@link #resolveChildren(PsiElement, String, PsiFile, boolean, boolean)} * instead. */ @Deprecated @Nullable public static PsiElement resolveChild( @Nullable final PsiElement parent, @NotNull final String referencedName, @Nullable final PsiFile containingFile, boolean fileOnly, boolean checkForPackage) { final List<RatedResolveResult> results = resolveChildren(parent, referencedName, containingFile, fileOnly, checkForPackage); return results.isEmpty() ? null : RatedResolveResult.sorted(results).get(0).getElement(); }