mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Filter broken releases in package details (PY-27669)
This commit is contained in:
@@ -20,6 +20,7 @@ import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.io.HttpRequests;
|
||||
import com.intellij.webcore.packaging.RepoPackage;
|
||||
import com.jetbrains.python.PythonHelpersLocator;
|
||||
import one.util.streamex.EntryStream;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -485,7 +486,11 @@ public class PyPIPackageUtil {
|
||||
|
||||
@NotNull
|
||||
public List<String> getReleases() {
|
||||
return new ArrayList<>(releases.keySet());
|
||||
return EntryStream.of(releases).filterValues(PackageDetails::isNotBrokenRelease).keys().toList();
|
||||
}
|
||||
|
||||
private static boolean isNotBrokenRelease(Object o) {
|
||||
return !(o instanceof List) || !((List)o).isEmpty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user