We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90bce69 commit cb938afCopy full SHA for cb938af
tools/prepare_notebooks.py
@@ -79,14 +79,17 @@ def ensure_bootstrap(nb) -> bool:
79
80
def process_notebook(path: Path) -> int:
81
nb = nbformat.read(path, as_version=4)
82
- changed = 0
83
- if ensure_bootstrap(nb):
84
- changed += 1
85
+ # Remove all 'tags' metadata from cells
86
for cell in nb.cells:
87
if 'tags' in cell.metadata:
88
cell.metadata.pop('tags')
89
+ # Add the bootstrap cell if needed
+ changed = 0
90
+ if ensure_bootstrap(nb):
91
+ changed += 1
92
+
93
# Normalize to ensure cell ids exist and structure is valid
94
if changed or any('id' not in c for c in nb.cells):
95
normalize(nb)
0 commit comments