[python] PY-83881: Remove check for new project when configuring SDK

GitOrigin-RevId: d610fa41848daf0512640c5a87d98d85cf29382d
This commit is contained in:
Alexey Katsman
2025-10-22 13:10:20 +00:00
committed by intellij-monorepo-bot
parent 5424d190f6
commit 033d7cc704
@@ -54,8 +54,12 @@ class PythonSdkConfigurator : DirectoryProjectConfigurator {
override fun configureProject(project: Project, baseDir: VirtualFile, moduleRef: Ref<Module>, isProjectCreatedWithWizard: Boolean) {
val sdk = project.pythonSdk
thisLogger().debug { "Input: $sdk, $isProjectCreatedWithWizard" }
if (sdk != null || isProjectCreatedWithWizard) {
thisLogger().debug { "Input: $sdk" }
/*
* Technically, we can end up in a situation when we created a project, but failed to configure SDK for some reason, which would
* lead to automatic SDK configuration.
*/
if (sdk != null) {
return
}
if (PySdkFromEnvironmentVariable.getPycharmPythonPathProperty()?.isNotBlank() == true) {