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 88697f4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions jupyter_server_ydoc/ydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

from jupyter_server.base.handlers import JupyterHandler
from jupyter_server.utils import ensure_async
from jupyter_ydoc import ydocs as YDOCS # type:ignore
from tornado import web
from tornado.websocket import WebSocketHandler
from jupyter_ydoc import ydocs as YDOCS # type: ignore
from tornado import web # type: ignore
from tornado.websocket import WebSocketHandler # type: ignore
from ypy_websocket.websocket_server import WebsocketServer, YRoom # type: ignore
from ypy_websocket.ystore import ( # type: ignore
BaseYStore,
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 88697f4

Please sign in to comment.