Skip to content

Commit 3f4dcbb

Browse files
committed
Cleanup
1 parent 4a860a1 commit 3f4dcbb

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

jupyter_ydoc/ynotebook.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from __future__ import annotations
55

66
import copy
7-
from dataclasses import dataclass
87
from functools import partial
98
from typing import Any, Callable
109
from uuid import uuid4
@@ -20,20 +19,9 @@
2019
NBFORMAT_MINOR_VERSION = 5
2120

2221

23-
@dataclass
24-
class LanguageInfo:
25-
name: str
26-
27-
28-
@dataclass
29-
class Kernelspec:
30-
name: str
31-
display_name: str
32-
33-
3422
class YMetadata(TypedMap):
35-
language_info: dict # LanguageInfo
36-
kernelspec: dict # Kernelspec
23+
language_info: dict
24+
kernelspec: dict
3725

3826

3927
class YMeta(TypedMap):
@@ -310,11 +298,7 @@ def set(self, value: dict) -> None:
310298
ymetadata = YMetadata()
311299
self._ymeta.metadata = ymetadata
312300
metadata = nb.get("metadata", {})
313-
# ymetadata.language_info =
314-
# asdict(LanguageInfo(**metadata.get("language_info", {"name": ""})))
315301
ymetadata.language_info = metadata.get("language_info", {"name": ""})
316-
# ymetadata.kernelspec =
317-
# asdict(Kernelspec(**metadata.get("kernelspec", {"name": "", "display_name": ""})))
318302
ymetadata.kernelspec = metadata.get("kernelspec", {"name": "", "display_name": ""})
319303

320304
def observe(self, callback: Callable[[str, Any], None]) -> None:

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ requires-python = ">=3.8"
1313
keywords = ["jupyter", "pycrdt", "yjs"]
1414
dependencies = [
1515
"importlib_metadata >=3.6; python_version<'3.10'",
16-
# "pycrdt >=0.12.1,<0.13.0",
17-
"pycrdt >=0.10.1,<0.11.0",
16+
"pycrdt >=0.12.1,<0.13.0",
1817
]
1918

2019
[[project.authors]]

0 commit comments

Comments
 (0)