mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
Python: refactor PyError hierarchy, migrate to PyResult.
DO: For upper-level (public) API use `PyResult`. (Optionally) for low-level APIs inside your modules use python `Result<S, E>`. Represent errors as `PyError` whenever possible. Report `PyError` to `ErrorSink` at the top of your code. DON'T: Use `kotlin.Result` Use `PyExecutionException` Use any exception to represent user errors. GitOrigin-RevId: 4ecf69e1fae8be9192cd33b90e0147c725a98964
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d366245171
commit
803e270d45
@@ -9,7 +9,7 @@ import com.intellij.python.community.execService.HelperName
|
||||
import com.intellij.python.community.execService.WhatToExec
|
||||
import com.jetbrains.python.PythonBinary
|
||||
import com.jetbrains.python.Result
|
||||
import com.jetbrains.python.errorProcessing.PyError
|
||||
import com.jetbrains.python.errorProcessing.PyResult
|
||||
import com.jetbrains.python.errorProcessing.failure
|
||||
import com.jetbrains.python.sdk.PySdkSettings
|
||||
import com.jetbrains.python.sdk.flavors.PythonSdkFlavor
|
||||
@@ -36,7 +36,7 @@ suspend fun createVenv(
|
||||
venvDir: Directory,
|
||||
inheritSitePackages: Boolean = false,
|
||||
envReader: VirtualEnvReader = VirtualEnvReader.Instance,
|
||||
): Result<PythonBinary, PyError> {
|
||||
): PyResult<PythonBinary> {
|
||||
val execService = ExecService()
|
||||
val args = buildList {
|
||||
if (inheritSitePackages) {
|
||||
|
||||
Reference in New Issue
Block a user