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
2424import com.jetbrains.python.psi.PyFile
2525import com.jetbrains.python.psi.PyFunction
2626import com.jetbrains.python.psi.resolve.QualifiedNameFinder
27+ import com.jetbrains.python.sdk.pythonSdk
2728import mu.KotlinLogging
2829import org.jetbrains.kotlin.idea.base.util.module
2930import org.jetbrains.kotlin.idea.base.util.sdk
@@ -119,7 +120,7 @@ object PythonDialogProcessor {
119120 }
120121 }
121122 }
122- val pythonPath = getPythonPath(elementsToShow )
123+ val pythonPath = getPythonPath(project )
123124 if (pythonPath == null ) {
124125 showErrorDialogLater(
125126 project,
@@ -334,8 +335,8 @@ object PythonDialogProcessor {
334335 }
335336}
336337
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
339340}
340341
341342fun findSrcModules (elements : Collection <PyElement >): List <Module > {
You can’t perform that action at this time.
0 commit comments