Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ intelliJPlatform = "2.0.1"
jupiter = "5.10.3"
kotlin = "2.0.10"
kover = "0.9.2"
ktlint = "12.1.1"
ktlint = "13.1.0"
remoteRobot = "0.11.23"
taskinfo = "2.2.0"
testLogger = "4.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,23 @@ abstract class ConfigurePythonActionAbstract : AnAction() {
// - any files within the binary folder.
e.presentation.isEnabledAndVisible =
when (val selectedPath = e.getData(CommonDataKeys.VIRTUAL_FILE)) {
null -> false
else ->
null -> {
false
}

else -> {
when (selectedPath.isDirectory) {
true -> {
// check if there is a python executable available under this folder -> name match for binary
PythonSdkUtil.getPythonExecutable(selectedPath.path) != null
}

false -> {
// check for presence of the activate_this.py + activate alongside or pyvenv.cfg above
PythonSdkUtil.isVirtualEnv(selectedPath.path)
}
}
}
}
}

Expand Down
Loading