From a563aa6d6f2c45b5191799940987425fbbcd05ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Collonval?= Date: Tue, 14 May 2024 15:49:52 +0200 Subject: [PATCH] Fix mypy --- jupyter_client/asynchronous/client.py | 2 +- jupyter_client/channels.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jupyter_client/asynchronous/client.py b/jupyter_client/asynchronous/client.py index 11873416..cde8ecaf 100644 --- a/jupyter_client/asynchronous/client.py +++ b/jupyter_client/asynchronous/client.py @@ -33,7 +33,7 @@ class AsyncKernelClient(KernelClient): raising :exc:`queue.Empty` if no message arrives within ``timeout`` seconds. """ - context = Instance(zmq.asyncio.Context) + context = Instance(zmq.asyncio.Context) # type:ignore[arg-type] def _context_default(self) -> zmq.asyncio.Context: self._created_context = True diff --git a/jupyter_client/channels.py b/jupyter_client/channels.py index c645b134..ea1f4cbf 100644 --- a/jupyter_client/channels.py +++ b/jupyter_client/channels.py @@ -220,7 +220,7 @@ def _recv(self, **kwargs: t.Any) -> t.Dict[str, t.Any]: ident, smsg = self.session.feed_identities(msg) return self.session.deserialize(smsg) - def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]: + def get_msg(self, timeout: t.Optional[int] = None) -> t.Dict[str, t.Any]: """Gets a message if there is one that is ready.""" assert self.socket is not None if timeout is not None: