Skip to content

Commit

Permalink
Don't unobserve and observe again (jupyterlab#39)
Browse files Browse the repository at this point in the history
* Don't unobserve and observe again

* Fix Test Prereleases
  • Loading branch information
davidbrochart authored and hbcarlos committed Jan 29, 2023
1 parent 671fb6c commit f838797
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
pip check
- name: Run the tests
run: |
pytest -vv || pytest -vv --lf
pytest -vv -W default || pytest -vv --lf
make_sdist:
name: Make SDist
Expand Down
4 changes: 0 additions & 4 deletions jupyter_server_ydoc/ydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ def on_document_change(self, event):
return
except Exception:
pass
# unobserve and observe again because the structure of the document may have changed
# e.g. a new cell added to a notebook
self.room.document.unobserve()
self.room.document.observe(self.on_document_change)
if self.saving_document is not None and not self.saving_document.done():
# the document is being saved, cancel that
self.saving_document.cancel()
Expand Down

0 comments on commit f838797

Please sign in to comment.