Set<Sdk> (@NotNull Project project) { final Set<Sdk> pythonSdks = new LinkedHashSet<>(); ReadAction.run( () -> { for (Module module : ModuleManager.getInstance(project).getModules()) { final Sdk sdk = PythonSdkUtil.findPythonSdk(module); if (sdk != null && sdk.getSdkType() instanceof PythonSdkType) { pythonSdks.add(sdk); } } } ); return pythonSdks; }