Skip to content

Commit 89c8de5

Browse files
authored
Update typings for mypy 1.6 (#1337)
1 parent 63463c4 commit 89c8de5

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
]
4545

4646
try:
47-
import enchant # type:ignore[import] # noqa
47+
import enchant # type:ignore[import-not-found] # noqa
4848

4949
extensions += ["sphinxcontrib.spelling"]
5050
except ImportError:

examples/identity/system_password/jupyter_server_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pwd
33
from getpass import getuser
44

5-
from pamela import PAMError, authenticate # type:ignore[import]
5+
from pamela import PAMError, authenticate # type:ignore[import-not-found]
66

77
from jupyter_server.auth.identity import IdentityProvider, User
88

examples/simple/simple_ext11/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""A Jupyter Server example application."""
22
import os
33

4-
from simple_ext1.application import SimpleApp1 # type:ignore[import]
4+
from simple_ext1.application import SimpleApp1 # type:ignore[import-not-found]
55
from traitlets import Bool, Unicode, observe
66

77
from jupyter_server.serverapp import aliases, flags

jupyter_server/gateway/managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from time import monotonic
1212
from typing import Any, Dict, Optional
1313

14-
import websocket # type:ignore[import]
14+
import websocket # type:ignore[import-untyped]
1515
from jupyter_client.asynchronous.client import AsyncKernelClient
1616
from jupyter_client.clientabc import KernelClientABC
1717
from jupyter_client.kernelspec import KernelSpecManager

jupyter_server/prometheus/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Jupyter Notebook also defines these metrics. Re-defining them results in a ValueError.
1010
# Try to de-duplicate by using the ones in Notebook if available.
1111
# See https://github.com/jupyter/jupyter_server/issues/209
12-
from notebook.prometheus.metrics import ( # type:ignore[import]
12+
from notebook.prometheus.metrics import ( # type:ignore[import-not-found]
1313
HTTP_REQUEST_DURATION_SECONDS,
1414
KERNEL_CURRENTLY_RUNNING_TOTAL,
1515
TERMINAL_CURRENTLY_RUNNING_TOTAL,

jupyter_server/services/sessions/sessionmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import sqlite3
1515
except ImportError:
1616
# fallback on pysqlite2 if Python was build without sqlite
17-
from pysqlite2 import dbapi2 as sqlite3 # type:ignore[import,no-redef]
17+
from pysqlite2 import dbapi2 as sqlite3 # type:ignore[import-not-found,no-redef]
1818

1919
from dataclasses import dataclass, fields
2020

jupyter_server/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
)
2323
from urllib.request import pathname2url # noqa: F401
2424

25-
from _frozen_importlib_external import _NamespacePath # type:ignore[import]
25+
from _frozen_importlib_external import _NamespacePath # type:ignore[import-not-found]
2626
from jupyter_core.utils import ensure_async
2727
from packaging.version import Version
2828
from tornado.httpclient import AsyncHTTPClient, HTTPClient, HTTPRequest, HTTPResponse

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ nowarn = "test -W default {args}"
104104

105105
[tool.hatch.envs.typing]
106106
features = ["test"]
107-
dependencies = [ "mypy>=1.5.1", "traitlets>=5.11.2", "jupyter_core>=5.3.2"]
107+
dependencies = [ "mypy~=1.6", "traitlets>=5.11.2", "jupyter_core>=5.3.2"]
108108
[tool.hatch.envs.typing.scripts]
109109
test = "mypy --install-types --non-interactive {args:.}"
110110

tests/test_terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import warnings
88

99
import pytest
10-
from flaky import flaky # type:ignore[import]
10+
from flaky import flaky # type:ignore[import-untyped]
1111
from tornado.httpclient import HTTPClientError
1212
from traitlets.config import Config
1313

0 commit comments

Comments
 (0)