Skip to content

Commit

Permalink
use any instead of object
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Nov 7, 2023
1 parent 3b46276 commit b1d251e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jupyter_server/auth/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def _force_clear_cookie(
name = escape.native_str(name)
expires = datetime.datetime.now(tz=datetime.timezone.utc) - datetime.timedelta(days=365)

morsel: Morsel[object] = Morsel()
morsel: Morsel[t.Any] = Morsel()
morsel.set(name, "", '""')
morsel["expires"] = httputil.format_timestamp(expires)
morsel["path"] = path
Expand Down
4 changes: 2 additions & 2 deletions jupyter_server/gateway/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def __init__(self, **kwargs):
super().__init__()
self.kernel_id = None
self.ws = None
self.ws_future: Future[object] = Future()
self.ws_future: Future[Any] = Future()
self.disconnected = False
self.retry = 0

Expand All @@ -184,7 +184,7 @@ async def _connect(self, kernel_id, message_callback):
kwargs = client.load_connection_args(**kwargs)

request = HTTPRequest(ws_url, **kwargs)
self.ws_future = cast(Future[object], websocket_connect(request))
self.ws_future = cast(Future[Any], websocket_connect(request))
self.ws_future.add_done_callback(self._connection_done)

loop = IOLoop.current()
Expand Down
10 changes: 5 additions & 5 deletions jupyter_server/services/kernels/connection/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def write_message(self):
_open_sessions: dict[str, KernelWebsocketHandler] = {}
_open_sockets: t.MutableSet[ZMQChannelsWebsocketConnection] = weakref.WeakSet()

_kernel_info_future: Future[object]
_close_future: Future[object]
_kernel_info_future: Future[t.Any]
_close_future: Future[t.Any]

channels = Dict({})
kernel_info_channel = Any(allow_none=True)
Expand Down Expand Up @@ -170,7 +170,7 @@ def nudge(self): # noqa
# establishing its zmq subscriptions before processing the next request.
if getattr(self.kernel_manager, "execution_state", None) == "busy":
self.log.debug("Nudge: not nudging busy kernel %s", self.kernel_id)
f: Future[object] = Future()
f: Future[t.Any] = Future()
f.set_result(None)
return _ensure_future(f)
# Use a transient shell channel to prevent leaking
Expand All @@ -182,8 +182,8 @@ def nudge(self): # noqa
# The IOPub used by the client, whose subscriptions we are verifying.
iopub_channel = self.channels["iopub"]

info_future: Future[object] = Future()
iopub_future: Future[object] = Future()
info_future: Future[t.Any] = Future()
iopub_future: Future[t.Any] = Future()
both_done = gen.multi([info_future, iopub_future])

def finish(_=None):
Expand Down

0 comments on commit b1d251e

Please sign in to comment.