Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typings for mypy 1.6 #983

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading