PY-30702 Remove unused code

closes https://github.com/JetBrains/intellij-community/pull/1736

GitOrigin-RevId: 0669006ed4d09ce4d1aeb345fe49ea5cd97437c3
This commit is contained in:
Koudai Aono
2021-10-19 23:12:27 +00:00
committed by intellij-monorepo-bot
parent 3b0ca15b2a
commit c23a28f247
@@ -15,12 +15,7 @@ object PoetryExtrasLineMarkerContributor : RunLineMarkerContributor() {
override fun getInfo(element: PsiElement): Info? {
val sdk = element.project.pythonSdk ?: return null
if (!sdk.isPoetry) return null
try {
if (element !is TomlKey) return null
}
catch (e: NoClassDefFoundError) {
return null //Toml plugin is installed. But, PyCharm has not restarted yet.
}
if (element !is TomlKey) return null
val keyValue = element.parent as? TomlKeyValue ?: return null
val header = (keyValue.parent as? TomlTable)?.header ?: return null
if (header.key?.text != "tool.poetry.extras") return null