mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't show python-skeletons path in the Python interpreter paths tab (PY-11218)
This commit is contained in:
@@ -36,6 +36,7 @@ import com.intellij.ui.ListUtil;
|
||||
import com.intellij.ui.ToolbarDecorator;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.jetbrains.python.codeInsight.userSkeletons.PyUserSkeletonsUtil;
|
||||
import com.jetbrains.python.sdk.PythonSdkAdditionalData;
|
||||
import com.jetbrains.python.sdk.PythonSdkType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -282,8 +283,11 @@ public class PythonPathEditor extends SdkPathEditor {
|
||||
private static boolean isStubPath(@NotNull VirtualFile file) {
|
||||
final String path = PythonSdkType.getSkeletonsRootPath(PathManager.getSystemPath());
|
||||
final VirtualFile skeletonRoot = LocalFileSystem.getInstance().findFileByPath(path);
|
||||
if (skeletonRoot != null) {
|
||||
return file.getPath().startsWith(skeletonRoot.getPath());
|
||||
if (skeletonRoot != null && file.getPath().startsWith(skeletonRoot.getPath())) {
|
||||
return true;
|
||||
}
|
||||
else if (file.equals(PyUserSkeletonsUtil.getUserSkeletonsDirectory())) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user