File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
utbot-intellij-python/src/main/kotlin/org/utbot/intellij/plugin/language/python Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import com.jetbrains.python.psi.PyElement
24
24
import com.jetbrains.python.psi.PyFile
25
25
import com.jetbrains.python.psi.PyFunction
26
26
import com.jetbrains.python.psi.resolve.QualifiedNameFinder
27
+ import com.jetbrains.python.sdk.pythonSdk
27
28
import mu.KotlinLogging
28
29
import org.jetbrains.kotlin.idea.base.util.module
29
30
import org.jetbrains.kotlin.idea.base.util.sdk
@@ -119,7 +120,7 @@ object PythonDialogProcessor {
119
120
}
120
121
}
121
122
}
122
- val pythonPath = getPythonPath(elementsToShow )
123
+ val pythonPath = getPythonPath(project )
123
124
if (pythonPath == null ) {
124
125
showErrorDialogLater(
125
126
project,
@@ -334,8 +335,8 @@ object PythonDialogProcessor {
334
335
}
335
336
}
336
337
337
- fun getPythonPath (elementsToShow : Set < PyElement > ): String? {
338
- return findSrcModules(elementsToShow).first().sdk ?.homePath
338
+ fun getPythonPath (project : Project ): String? {
339
+ return project.pythonSdk ?.homePath
339
340
}
340
341
341
342
fun findSrcModules (elements : Collection <PyElement >): List <Module > {
You can’t perform that action at this time.
0 commit comments