Skip to content

Commit

Permalink
Update typings for mypy 1.6 (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Oct 15, 2023
1 parent dfb4c12 commit 05e88b1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions jupyter_client/localinterfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
LOCAL_IPS: List = []
PUBLIC_IPS: List = []

LOCALHOST = ""
LOCALHOST: str = ""


def _uniq_stable(elems: Iterable) -> List:
Expand Down Expand Up @@ -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 = []
Expand Down
2 changes: 1 addition & 1 deletion jupyter_client/ssh/tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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:.}"

Expand Down

0 comments on commit 05e88b1

Please sign in to comment.