File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ def clean_single_notebook(
4949 if not cell ["source" ] and not keep_empty :
5050 nb ["cells" ].remove (cell )
5151 cleaned = True
52+ if "attachments" in cell and len (cell ["attachments" ]) == 0 :
53+ del cell ["attachments" ]
54+ cleaned = True
5255
5356 if not nb ["cells" ]:
5457 print (f"Notebook '{ file } ' does not have any valid cells." )
Original file line number Diff line number Diff line change 1919 "source" : [
2020 " print(\" saved from vscode\" )"
2121 ]
22+ },
23+ {
24+ "cell_type" : " markdown" ,
25+ "metadata" : {},
26+ "source" : [
27+ " # Markdown"
28+ ]
2229 }
2330 ],
2431 "metadata" : {
Original file line number Diff line number Diff line change 3030 "source" : [
3131 " print(\" saved from vscode\" )"
3232 ]
33+ },
34+ {
35+ "attachments" : {},
36+ "cell_type" : " markdown" ,
37+ "metadata" : {},
38+ "source" : [
39+ " # Markdown"
40+ ]
3341 }
3442 ],
3543 "metadata" : {
You can’t perform that action at this time.
0 commit comments