[python] remove the not installed inspection from pyproject.toml/build-system (PY-82182)

GitOrigin-RevId: 5668767874c720af7794a33d38626a7531610c33
This commit is contained in:
Vitaly Legchilkin
2025-06-25 22:43:47 +00:00
committed by intellij-monorepo-bot
parent 5e664b086a
commit e2c9b90b03
29 changed files with 85 additions and 47 deletions
+1
View File
@@ -33,6 +33,7 @@ jvm_library(
"@lib//:io-github-z4kn4fein-semver-jvm",
"//platform/projectModel-api:projectModel",
"//python/python-sdk:sdk",
"//python/python-pyproject:pyproject",
],
runtime_deps = [":hatch_resources"]
)
@@ -43,5 +43,6 @@
<orderEntry type="library" name="io.github.z4kn4fein.semver.jvm" level="project" />
<orderEntry type="module" module-name="intellij.platform.projectModel" />
<orderEntry type="module" module-name="intellij.python.sdk" />
<orderEntry type="module" module-name="intellij.python.pyproject" />
</component>
</module>
@@ -14,6 +14,7 @@ import com.intellij.python.hatch.cli.HatchEnvironments
import com.intellij.python.hatch.runtime.HatchConstants
import com.intellij.python.hatch.runtime.HatchRuntime
import com.intellij.python.hatch.runtime.createHatchRuntime
import com.intellij.python.pyproject.PY_PROJECT_TOML
import com.jetbrains.python.PythonBinary
import com.jetbrains.python.Result
import com.jetbrains.python.errorProcessing.PyResult
@@ -65,7 +66,7 @@ internal class CliBasedHatchService private constructor(
when {
workingDirectoryPath.resolve("hatch.toml").exists() -> true
else -> {
val pyProjectTomlPath = workingDirectoryPath.resolve("pyproject.toml").takeIf { it.isRegularFile() }
val pyProjectTomlPath = workingDirectoryPath.resolve(PY_PROJECT_TOML).takeIf { it.isRegularFile() }
val hatchRegex = """^\[tool\.hatch\..+]$""".toRegex(RegexOption.MULTILINE)
pyProjectTomlPath?.readText()?.contains(hatchRegex) == true
}