Skip to content

Commit

Permalink
Remove outputs of type stdin when converting cell to dict
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed May 16, 2024
1 parent d9d7e32 commit e0b747a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jupyter_ydoc/ynotebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def get_cell(self, index: int) -> Dict[str, Any]:
and not cell["attachments"]
):
del cell["attachments"]
outputs = cell.get("outputs", [])
for idx, output in enumerate(outputs):
if output["output_type"] == "stdin":
del outputs[idx]
return cell

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

0 comments on commit e0b747a

Please sign in to comment.