From 753526cd88f6f87637cc03903afe6f9737778a6f Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Mon, 10 Nov 2025 23:39:39 +0100 Subject: [PATCH] [python] PY-79486: (WIP): Rename wrongly named class GitOrigin-RevId: 81472246ac871c80655290f687f560d48b12094d --- .../python/{PathShorter.kt => PathShortener.kt} | 10 +++++----- .../backend/src/impl/ModulesSdkConfigurator.kt | 6 +++--- python/src/com/jetbrains/python/sdk/add/v2/uiUtils.kt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename python/openapi/src/com/jetbrains/python/{PathShorter.kt => PathShortener.kt} (86%) diff --git a/python/openapi/src/com/jetbrains/python/PathShorter.kt b/python/openapi/src/com/jetbrains/python/PathShortener.kt similarity index 86% rename from python/openapi/src/com/jetbrains/python/PathShorter.kt rename to python/openapi/src/com/jetbrains/python/PathShortener.kt index e6401023d93d..7c0d268e10f8 100644 --- a/python/openapi/src/com/jetbrains/python/PathShorter.kt +++ b/python/openapi/src/com/jetbrains/python/PathShortener.kt @@ -11,7 +11,7 @@ import com.intellij.platform.eel.isWindows import com.intellij.platform.eel.path.EelPath import com.intellij.platform.eel.provider.asEelPath import com.intellij.platform.eel.provider.getEelDescriptor -import com.jetbrains.python.PathShorter.Companion.create +import com.jetbrains.python.PathShortener.Companion.create import org.jetbrains.annotations.ApiStatus import java.nio.file.Path @@ -21,10 +21,10 @@ import java.nio.file.Path * 2. Convert paths *on the same eel* using [toString] */ @ApiStatus.Internal -class PathShorter private constructor(private val map: List>) { +class PathShortener private constructor(private val map: List>) { companion object { - suspend fun create(project: Project): PathShorter = create(project.getEelDescriptor().toEelApi()) - suspend fun create(eelApi: EelApi): PathShorter { + suspend fun create(project: Project): PathShortener = create(project.getEelDescriptor().toEelApi()) + suspend fun create(eelApi: EelApi): PathShortener { val eelDescriptor = eelApi.descriptor val map = buildList { if (eelDescriptor.osFamily.isWindows) { @@ -44,7 +44,7 @@ class PathShorter private constructor(private val map: List, - private val pathShorter: PathShorter, + private val pathShorter: PathShortener, ) { val modulesDTO: List @@ -90,7 +90,7 @@ internal class ModulesSdkConfigurator private constructor( /** * Create instance and save in [project] */ - suspend fun create(project: Project): ModulesSdkConfigurator = ModulesSdkConfigurator(project, getModulesWithoutSDKCreateInfo(project), PathShorter.create(project)).also { + suspend fun create(project: Project): ModulesSdkConfigurator = ModulesSdkConfigurator(project, getModulesWithoutSDKCreateInfo(project), PathShortener.create(project)).also { project.putUserData(key, it) } diff --git a/python/src/com/jetbrains/python/sdk/add/v2/uiUtils.kt b/python/src/com/jetbrains/python/sdk/add/v2/uiUtils.kt index c46c6eed0bea..d2e109f0ee8e 100644 --- a/python/src/com/jetbrains/python/sdk/add/v2/uiUtils.kt +++ b/python/src/com/jetbrains/python/sdk/add/v2/uiUtils.kt @@ -217,7 +217,7 @@ private val userHomePath = lazy { /** * Replaces [userHomePath] in [sdkHomePath] to `~` - * Use [com.jetbrains.python.PathShorter] instead + * Use [com.jetbrains.python.PathShortener] instead */ @ApiStatus.Internal @Deprecated("Use PathShorter")