[PyCharm] Jupyter/RemoteDev (fix): Fixed missing outputs in Jupyter notebooks in Idea. #PY-83120 Ready For Merge

(cherry picked from commit ff52a0f8729663bcef6f401333f5c716834faeeb)


(cherry picked from commit 789f65dda71acd76783abc398791d5cf2fa5ab71)

IJ-CR-183009

GitOrigin-RevId: 179f930eb28eeddc4ac1109e2aa1b7a42113fb92
This commit is contained in:
Nikita Pavlenko
2025-11-20 15:13:29 +00:00
committed by intellij-monorepo-bot
parent eb9ef80004
commit 088e3789c2
@@ -23,9 +23,8 @@ class EditorCellOutputs(private val cell: EditorCell) {
}
private fun getOutputs(): List<EditorCellOutput> =
NotebookOutputDataKeyExtractor.EP_NAME.extensionList.asSequence()
.mapNotNull { it.extract(editor as EditorImpl, cell.interval) }
.firstOrNull()
NotebookOutputDataKeyExtractor.EP_NAME.extensionList
.firstNotNullOfOrNull { it.extract(editor as EditorImpl, cell.interval) }
?.takeIf { it.isNotEmpty() }
?.map { EditorCellOutput(it) }
?: emptyList()