Skip to content

Commit 953d3cc

Browse files
committed
Revert to simpler mock, as Future is not subscriptable on 3.7 yet,
use type ignore instead
1 parent c7754aa commit 953d3cc

File tree

1 file changed

+2
-6
lines changed
  • python_packages/jupyter_lsp/jupyter_lsp/tests

1 file changed

+2
-6
lines changed

python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import json
22
import pathlib
33
import shutil
4-
from typing import Any, Dict, Union
4+
from typing import Text
55

66
from jupyter_server.serverapp import ServerApp
77
from pytest import fixture
8-
from tornado.concurrent import Future
98
from tornado.httputil import HTTPServerRequest
109
from tornado.queues import Queue
1110
from tornado.web import Application
@@ -132,12 +131,9 @@ def initialize(self, manager):
132131
self._messages_wrote = Queue()
133132
self._ping_sent = False
134133

135-
def write_message(
136-
self, message: Union[bytes, str, Dict[str, Any]], binary: bool = False
137-
) -> Future[None]:
134+
def write_message(self, message: Text) -> None: # type: ignore
138135
self.log.warning("write_message %s", message)
139136
self._messages_wrote.put_nowait(message)
140-
return Future()
141137

142138
def send_ping(self):
143139
self._ping_sent = True

0 commit comments

Comments
 (0)