Skip to content

Commit

Permalink
Fix typing for python <=3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Jul 25, 2022
1 parent 21bf413 commit d0ae242
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jupyter_server_ydoc/ydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from jupyter_server.base.handlers import JupyterHandler
from jupyter_server.utils import ensure_async
from jupyter_ydoc import ydocs as YDOCS # type:ignore
from jupyter_ydoc import ydocs as YDOCS # type: ignore
from tornado import web
from tornado.websocket import WebSocketHandler
from ypy_websocket.websocket_server import WebsocketServer, YRoom # type: ignore
Expand All @@ -35,8 +35,8 @@ class JupyterRoom(YRoom):
def __init__(self, type: str, ystore: BaseYStore):
super().__init__(ready=False, ystore=ystore)
self.type = type
self.cleaner: Optional[asyncio.Task[Any]] = None
self.watcher: Optional[asyncio.Task[Any]] = None
self.cleaner: Optional["asyncio.Task[Any]"] = None
self.watcher: Optional["asyncio.Task[Any]"] = None
self.document = YDOCS.get(type, YFILE)(self.ydoc)


Expand Down Expand Up @@ -67,9 +67,9 @@ def get_room(self, path: str) -> JupyterRoom:

class YDocWebSocketHandler(WebSocketHandler, JupyterHandler):

saving_document: Optional[asyncio.Task[Any]]
saving_document: Optional["asyncio.Task[Any]"]
websocket_server: Optional[JupyterWebsocketServer] = None
_message_queue: asyncio.Queue[Any]
_message_queue: "asyncio.Queue[Any]"

# Override max_message size to 1GB
@property
Expand Down

0 comments on commit d0ae242

Please sign in to comment.