Python: narrow various return types

GitOrigin-RevId: a98a36eefe29964754fd28e445703ac91464237b
This commit is contained in:
Ilya.Kazakevich
2025-06-30 21:13:58 +02:00
committed by intellij-monorepo-bot
parent 5dd3d2150f
commit fb1a3c893b
3 changed files with 6 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ import com.intellij.python.community.execService.impl.transformerToHandler
import com.intellij.python.community.execService.python.HelperName
import com.intellij.python.community.execService.python.impl.validatePythonAndGetVersionImpl
import com.intellij.python.community.helpersLocator.PythonHelpersLocator
import com.jetbrains.python.errorProcessing.PyExecResult
import com.jetbrains.python.errorProcessing.PyResult
import com.jetbrains.python.psi.LanguageLevel
import org.jetbrains.annotations.ApiStatus
@@ -20,7 +21,7 @@ suspend fun <T> ExecService.executePythonAdvanced(
argsBuilder: suspend ArgsBuilder.() -> Unit = {},
options: ExecOptions = ExecOptions(),
processInteractiveHandler: ProcessInteractiveHandler<T>,
): PyResult<T> =
): PyExecResult<T> =
executeAdvanced(python.binary, {
addArgs(*python.args.toTypedArray())
argsBuilder()
@@ -38,7 +39,7 @@ suspend fun <T> ExecService.executeHelperAdvanced(
options: ExecOptions = ExecOptions(),
procListener: PyProcessListener? = null,
processOutputTransformer: ProcessOutputTransformer<T>,
): PyResult<T> = executePythonAdvanced(python, {
): PyExecResult<T> = executePythonAdvanced(python, {
addLocalFile(PythonHelpersLocator.findPathInHelpers(helper))
addArgs(*args.toTypedArray())