mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
Use local virtual env for inspections if available
GitOrigin-RevId: 10bb1c24430b854e79be07f1d0ff0e7f3e9f14f2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e15f47fa57
commit
525e9f1aec
@@ -25,7 +25,6 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("UseOfSystemOutOrSystemErr")
|
||||
public class PythonPluginCommandLineInspectionProjectConfigurator implements CommandLineInspectionProjectConfigurator {
|
||||
@Override
|
||||
public boolean isApplicable(@NotNull Path projectPath, @NotNull CommandLineInspectionLogger logger) {
|
||||
@@ -48,7 +47,7 @@ public class PythonPluginCommandLineInspectionProjectConfigurator implements Com
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureEnvironment(@NotNull CommandLineInspectionLogger logger) {
|
||||
public void configureEnvironment(@NotNull Path projectPath, @NotNull CommandLineInspectionLogger logger) {
|
||||
logger.logMessageLn(3, "Python environment configuration...");
|
||||
List<Sdk> sdks = PythonSdkUtil.getAllSdks();
|
||||
logger.logMessageLn(3, "Python interpreters detected:");
|
||||
@@ -56,7 +55,7 @@ public class PythonPluginCommandLineInspectionProjectConfigurator implements Com
|
||||
logger.logMessageLn(3, sdk.getHomePath());
|
||||
}
|
||||
if (sdks.isEmpty()) {
|
||||
final List<Sdk> detectedSdks = PySdkExtKt.findAllPythonSdks();
|
||||
final List<Sdk> detectedSdks = PySdkExtKt.findAllPythonSdks(projectPath);
|
||||
|
||||
if (detectedSdks.size() > 0) {
|
||||
for (Sdk sdk : detectedSdks) {
|
||||
|
||||
Reference in New Issue
Block a user