Skip to content

Commit e0b747a

Browse files
committed
Remove outputs of type stdin when converting cell to dict
1 parent d9d7e32 commit e0b747a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jupyter_ydoc/ynotebook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ def get_cell(self, index: int) -> Dict[str, Any]:
109109
and not cell["attachments"]
110110
):
111111
del cell["attachments"]
112+
outputs = cell.get("outputs", [])
113+
for idx, output in enumerate(outputs):
114+
if output["output_type"] == "stdin":
115+
del outputs[idx]
112116
return cell
113117

114118
def append_cell(self, value: Dict[str, Any]) -> None:

0 commit comments

Comments
 (0)