mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup [python]: Use fake ctor instead of static Instance field for VirtualEnvReader.
Use `VirtualEnvReader()` instead of `VirtualEnvReader.Instance` as it is shorter and more idiomatic Space-RevId: 58448643037948f1e7dc2e84303844b50bd56ee9 GitOrigin-RevId: 35d5b67b8a2d2964ec4b5f611b0f081ac722be2a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3f71dfd564
commit
d50a714a98
@@ -45,7 +45,6 @@ class VirtualEnvReader private constructor(
|
||||
null -> null
|
||||
})
|
||||
|
||||
private constructor() : this(forcedVars = null, forcedOs = null)
|
||||
|
||||
/**
|
||||
* Dir with virtual envs
|
||||
@@ -222,8 +221,7 @@ class VirtualEnvReader private constructor(
|
||||
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val Instance: VirtualEnvReader = VirtualEnvReader()
|
||||
internal val Instance: VirtualEnvReader = VirtualEnvReader(forcedVars = null, forcedOs = null)
|
||||
|
||||
|
||||
/**
|
||||
@@ -241,4 +239,10 @@ class VirtualEnvReader private constructor(
|
||||
private val WIN_BINS = setOf("pypy.exe", "python.exe")
|
||||
private fun getLocalEelIfApp(): EelApi? = if (ApplicationManager.getApplication() != null) localEel else null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Default (production) instance
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
fun VirtualEnvReader(): VirtualEnvReader = Instance
|
||||
Reference in New Issue
Block a user