Skip to content

Commit e6646e7

Browse files
committed
remove all ignored types comments
1 parent 9df9ac0 commit e6646e7

File tree

10 files changed

+23
-25
lines changed

10 files changed

+23
-25
lines changed

jupyter_client/asynchronous/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AsyncKernelClient(KernelClient):
3434
raising :exc:`queue.Empty` if no message arrives within ``timeout`` seconds.
3535
"""
3636

37-
context = Instance(zmq.asyncio.Context) # type:ignore[arg-type]
37+
context = Instance(zmq.asyncio.Context)
3838

3939
def _context_default(self) -> zmq.asyncio.Context:
4040
self._created_context = True
@@ -52,11 +52,11 @@ def _context_default(self) -> zmq.asyncio.Context:
5252
wait_for_ready = KernelClient._async_wait_for_ready
5353

5454
# The classes to use for the various channels
55-
shell_channel_class = Type(AsyncZMQSocketChannel) # type:ignore[arg-type]
56-
iopub_channel_class = Type(AsyncZMQSocketChannel) # type:ignore[arg-type]
57-
stdin_channel_class = Type(AsyncZMQSocketChannel) # type:ignore[arg-type]
58-
hb_channel_class = Type(HBChannel) # type:ignore[arg-type]
59-
control_channel_class = Type(AsyncZMQSocketChannel) # type:ignore[arg-type]
55+
shell_channel_class = Type(AsyncZMQSocketChannel)
56+
iopub_channel_class = Type(AsyncZMQSocketChannel)
57+
stdin_channel_class = Type(AsyncZMQSocketChannel)
58+
hb_channel_class = Type(HBChannel)
59+
control_channel_class = Type(AsyncZMQSocketChannel)
6060

6161
_recv_reply = KernelClient._async_recv_reply
6262

jupyter_client/blocking/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ class BlockingKernelClient(KernelClient):
4949
wait_for_ready = run_sync(KernelClient._async_wait_for_ready)
5050

5151
# The classes to use for the various channels
52-
shell_channel_class = Type(ZMQSocketChannel) # type:ignore[arg-type]
53-
iopub_channel_class = Type(ZMQSocketChannel) # type:ignore[arg-type]
54-
stdin_channel_class = Type(ZMQSocketChannel) # type:ignore[arg-type]
55-
hb_channel_class = Type(HBChannel) # type:ignore[arg-type]
56-
control_channel_class = Type(ZMQSocketChannel) # type:ignore[arg-type]
52+
shell_channel_class = Type(ZMQSocketChannel)
53+
iopub_channel_class = Type(ZMQSocketChannel)
54+
stdin_channel_class = Type(ZMQSocketChannel)
55+
hb_channel_class = Type(HBChannel)
56+
control_channel_class = Type(ZMQSocketChannel)
5757

5858
_recv_reply = run_sync(KernelClient._async_recv_reply)
5959

jupyter_client/localinterfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def _load_ips_psutil() -> None:
181181

182182
def _load_ips_netifaces() -> None:
183183
"""load ip addresses with netifaces"""
184-
import netifaces # type: ignore[import-not-found]
184+
import netifaces
185185

186186
addr_dict: dict[str, list[str]] = {}
187187

jupyter_client/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ async def _async_pre_start_kernel(
391391
self.kernel_id = self.kernel_id or kw.pop("kernel_id", str(uuid.uuid4()))
392392
# save kwargs for use in restart
393393
# assigning Traitlets Dicts to Dict make mypy unhappy but is ok
394-
self._launch_args = kw.copy() # type:ignore [assignment]
394+
self._launch_args = kw.copy()
395395
if self.provisioner is None: # will not be None on restarts
396396
self.provisioner = KPF.instance(parent=self.parent).create_provisioner_instance(
397397
self.kernel_id,

jupyter_client/provisioning/local_provisioner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from .provisioner_base import KernelProvisionerBase
1515

1616

17-
class LocalProvisioner(KernelProvisionerBase): # type:ignore[misc]
17+
class LocalProvisioner(KernelProvisionerBase):
1818
"""
1919
:class:`LocalProvisioner` is a concrete class of ABC :py:class:`KernelProvisionerBase`
2020
and is the out-of-box default implementation used when no kernel provisioner is

jupyter_client/provisioning/provisioner_base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ class KernelProvisionerMeta(ABCMeta, type(LoggingConfigurable)): # type: ignore
1515
pass
1616

1717

18-
class KernelProvisionerBase( # type:ignore[misc]
19-
ABC, LoggingConfigurable, metaclass=KernelProvisionerMeta
20-
):
18+
class KernelProvisionerBase(ABC, LoggingConfigurable, metaclass=KernelProvisionerMeta):
2119
"""
2220
Abstract base class defining methods for KernelProvisioner classes.
2321

jupyter_client/runapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
frontend_flags = set(frontend_flags_dict.keys())
3939

4040

41-
class RunApp(JupyterApp, JupyterConsoleApp): # type:ignore[misc]
41+
class RunApp(JupyterApp, JupyterConsoleApp):
4242
"""An Jupyter Console app to run files."""
4343

4444
version = __version__

jupyter_client/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ def send(
812812
track = False
813813

814814
if isinstance(stream, zmq.asyncio.Socket):
815-
assert stream is not None # type:ignore[unreachable]
815+
assert stream is not None
816816
stream = zmq.Socket.shadow(stream.underlying)
817817

818818
if isinstance(msg_or_type, Message | dict):

jupyter_client/ssh/tunnel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SSHException(Exception): # type:ignore[no-redef] # noqa
3535
from .forward import forward_tunnel
3636

3737
try:
38-
import pexpect # type: ignore[import-untyped]
38+
import pexpect
3939
except ImportError:
4040
pexpect = None
4141

jupyter_client/threaded.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,11 @@ def stop_channels(self) -> None:
335335
if self.ioloop_thread and self.ioloop_thread.is_alive():
336336
self.ioloop_thread.stop()
337337

338-
iopub_channel_class = Type(ThreadedZMQSocketChannel) # type:ignore[arg-type]
339-
shell_channel_class = Type(ThreadedZMQSocketChannel) # type:ignore[arg-type]
340-
stdin_channel_class = Type(ThreadedZMQSocketChannel) # type:ignore[arg-type]
341-
hb_channel_class = Type(HBChannel) # type:ignore[arg-type]
342-
control_channel_class = Type(ThreadedZMQSocketChannel) # type:ignore[arg-type]
338+
iopub_channel_class = Type(ThreadedZMQSocketChannel)
339+
shell_channel_class = Type(ThreadedZMQSocketChannel)
340+
stdin_channel_class = Type(ThreadedZMQSocketChannel)
341+
hb_channel_class = Type(HBChannel)
342+
control_channel_class = Type(ThreadedZMQSocketChannel)
343343

344344
def is_alive(self) -> bool:
345345
"""Is the kernel process still running?"""

0 commit comments

Comments
 (0)