From 3378b85c4b5390801f4ded720eee7a380a7737d6 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 14 Oct 2023 19:29:48 -0500 Subject: [PATCH] update typings --- docs/conf.py | 4 ++-- jupyter_client/localinterfaces.py | 4 ++-- jupyter_client/ssh/tunnel.py | 2 +- pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 290f8baf..1054707c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,7 +16,7 @@ import os.path as osp import shutil -from sphinx.util import logging # type:ignore[import] +from sphinx.util import logging # type:ignore[import-not-found] # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -51,7 +51,7 @@ def filter(self, record: pylogging.LogRecord) -> bool: # End of a workaround try: - import enchant # type:ignore[import] # noqa + import enchant # type:ignore[import-not-found] # noqa extensions += ["sphinxcontrib.spelling"] except ImportError: diff --git a/jupyter_client/localinterfaces.py b/jupyter_client/localinterfaces.py index 9bdde38c..4b9143bd 100644 --- a/jupyter_client/localinterfaces.py +++ b/jupyter_client/localinterfaces.py @@ -12,7 +12,7 @@ LOCAL_IPS: List = [] PUBLIC_IPS: List = [] -LOCALHOST = "" +LOCALHOST: str = "" def _uniq_stable(elems: Iterable) -> List: @@ -151,7 +151,7 @@ def _load_ips_ipconfig(): def _load_ips_netifaces(): """load ip addresses with netifaces""" - import netifaces # type: ignore[import] + import netifaces # type: ignore[import-not-found] global LOCALHOST local_ips = [] diff --git a/jupyter_client/ssh/tunnel.py b/jupyter_client/ssh/tunnel.py index bb160318..e98e4690 100644 --- a/jupyter_client/ssh/tunnel.py +++ b/jupyter_client/ssh/tunnel.py @@ -31,7 +31,7 @@ class SSHException(Exception): # type:ignore[no-redef] # noqa from .forward import forward_tunnel try: - import pexpect # type: ignore[import] + import pexpect # type: ignore[import-untyped] except ImportError: pexpect = None diff --git a/pyproject.toml b/pyproject.toml index e716c121..edf49e0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,7 +99,7 @@ nowarn = "test -W default {args}" [tool.hatch.envs.typing] features = ["test"] -dependencies = ["mypy>=1.5.1", "traitlets>=5.11.2", "jupyter_core>=5.3.2"] +dependencies = ["mypy~=1.6", "traitlets>=5.11.2", "jupyter_core>=5.3.2"] [tool.hatch.envs.typing.scripts] test = "mypy --install-types --non-interactive {args:.}"