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.
2 parents d94c263 + a892a6b commit 4a860a1Copy full SHA for 4a860a1
.pre-commit-config.yaml
@@ -17,7 +17,7 @@ repos:
17
exclude: ^\.yarn
18
19
- repo: https://github.com/astral-sh/ruff-pre-commit
20
- rev: v0.8.6
+ rev: v0.9.2
21
hooks:
22
- id: ruff
23
args: [--fix, --show-fixes]
jupyter_ydoc/ynotebook.py
@@ -251,7 +251,11 @@ def get(self) -> dict:
251
cells = []
252
for i in range(len(self._ycells)):
253
cell = self.get_cell(i)
254
- if "id" in cell and meta["nbformat"] == 4 and meta["nbformat_minor"] <= 4:
+ if (
255
+ "id" in cell
256
+ and int(meta.get("nbformat", 0)) == 4
257
+ and int(meta.get("nbformat_minor", 0)) <= 4
258
+ ):
259
# strip cell IDs if we have notebook format 4.0-4.4
260
del cell["id"]
261
if (
0 commit comments