mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-23 07:39:39 +07:00
[python] (PY-78749) single dialog for all types of Python SDKs
+ old dialogs were removed GitOrigin-RevId: 00ed85ba578c6419373d8605ed50954e7aa58f0a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ab8455f916
commit
5e2028d129
@@ -9,7 +9,6 @@ import com.intellij.python.community.helpersLocator.PythonHelpersLocator
|
||||
import com.jetbrains.python.PythonBinary
|
||||
import com.jetbrains.python.errorProcessing.PyResult
|
||||
import com.jetbrains.python.psi.LanguageLevel
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
/**
|
||||
* Python binary itself (i.e python.exe)
|
||||
@@ -22,13 +21,13 @@ typealias PythonBinaryOnEelOrTarget = BinaryToExec
|
||||
* Returns `stdout`
|
||||
*/
|
||||
suspend fun ExecService.executeHelper(
|
||||
python: PythonBinary,
|
||||
python: BinaryToExec,
|
||||
helper: HelperName,
|
||||
args: List<String> = emptyList(),
|
||||
options: ExecOptions = ExecOptions(),
|
||||
procListener: PyProcessListener? = null,
|
||||
): PyResult<String> =
|
||||
executeHelperAdvanced(ExecutablePython.vanillaExecutablePython(python.asBinToExec()), helper, args, options, procListener, ZeroCodeStdoutTransformer)
|
||||
executeHelperAdvanced(ExecutablePython.vanillaExecutablePython(python), helper, args, options, procListener, ZeroCodeStdoutTransformer)
|
||||
|
||||
/**
|
||||
* Ensures that this python is executable and returns its version. Error if python is broken.
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.intellij.platform.eel.provider.asNioPath
|
||||
import com.intellij.platform.eel.provider.localEel
|
||||
import com.intellij.platform.testFramework.junit5.eel.params.api.*
|
||||
import com.intellij.python.community.execService.ExecService
|
||||
import com.intellij.python.community.execService.asBinToExec
|
||||
import com.intellij.python.community.execService.python.executeHelper
|
||||
import com.intellij.python.community.execService.python.validatePythonAndGetVersion
|
||||
import com.intellij.python.community.helpersLocator.PythonHelpersLocator
|
||||
@@ -49,7 +50,7 @@ class HelpersShowCaseTest() {
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
val output = ExecService().executeHelper(python, helper.name, listOf("--version")).orThrow().trim()
|
||||
val output = ExecService().executeHelper(python.asBinToExec(), helper.name, listOf("--version")).orThrow().trim()
|
||||
Assertions.assertEquals(hello, output, "wrong helper output")
|
||||
|
||||
val langLevel = ExecService().validatePythonAndGetVersion(python).getOrThrow()
|
||||
|
||||
Reference in New Issue
Block a user