Skip to content

Commit a8af145

Browse files
Apply suggestions from review
Co-authored-by: David Brochart <[email protected]>
1 parent c1b0496 commit a8af145

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

jupyter_ydoc/ybasedoc.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ def __init__(self, ydoc: Optional[Doc] = None, awareness: Optional[Awareness] =
2626
2727
:param ydoc: The :class:`pycrdt.Doc` that will hold the data of the document, if provided.
2828
:type ydoc: :class:`pycrdt.Doc`, optional.
29-
:param awareness: The :class:`pycrdt.Awareness` that share non persistent data
29+
:param awareness: The :class:`pycrdt.Awareness` that shares non persistent data
3030
between clients.
3131
:type awareness: :class:`pycrdt.Awareness`, optional.
3232
"""
3333
if ydoc is None:
3434
self._ydoc = Doc()
3535
else:
3636
self._ydoc = ydoc
37-
self._awareness = awareness
37+
self.awareness = awareness
3838

3939
self._ystate = self._ydoc.get("state", type=Map)
4040
self._subscriptions = {}
@@ -79,26 +79,6 @@ def ydoc(self) -> Doc:
7979
"""
8080
return self._ydoc
8181

82-
@property
83-
def awareness(self) -> Awareness | None:
84-
"""
85-
Returns the awareness.
86-
87-
:return: The document's awareness.
88-
:rtype: :class:`pycrdt.Awareness` or None.
89-
"""
90-
return self._awareness
91-
92-
@awareness.setter
93-
def awareness(self, value: Awareness) -> None:
94-
"""
95-
Sets the awareness.
96-
97-
:param value: The awareness to set.
98-
:type value: :class:`pycrdt.Awareness`.
99-
"""
100-
self._awareness = value
101-
10282
@property
10383
def source(self) -> Any:
10484
"""

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +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.9.16,<0.10.0",
16+
"pycrdt >=0.10.1,<0.11.0",
1717
]
1818

1919
[[project.authors]]

0 commit comments

Comments
 (0)