Skip to content

Commit

Permalink
Drop YJGIS 'source' root type
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Jul 1, 2024
1 parent ea74337 commit a8c6b24
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions python/jupytergis_core/jupytergis_core/jgis_ydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
from typing import Any, Callable
from functools import partial

from pycrdt import Array, Map, Text
from pycrdt import Array, Map
from jupyter_ydoc.ybasedoc import YBaseDoc


class YJGIS(YBaseDoc):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._ydoc["source"] = self._ysource = Text()
self._ydoc["layers"] = self._ylayers = Map()
self._ydoc["sources"] = self._ysources = Map()
self._ydoc["options"] = self._yoptions = Map()
Expand Down Expand Up @@ -59,9 +58,6 @@ def observe(self, callback: Callable[[str, Any], None]):
self._subscriptions[self._ystate] = self._ystate.observe(
partial(callback, "state")
)
self._subscriptions[self._ysource] = self._ysource.observe(
partial(callback, "source")
)
self._subscriptions[self._ylayers] = self._ylayers.observe_deep(
partial(callback, "layers")
)
Expand Down

0 comments on commit a8c6b24

Please sign in to comment.