diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e39ba275e..fcc8b96b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: types_or: [yaml, html, json] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v2.1.0" + rev: "v2.3.0" hooks: - id: mypy files: ipykernel @@ -95,7 +95,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.20 + rev: v0.15.21 hooks: - id: ruff-check types_or: [python, jupyter] diff --git a/ipykernel/kernelbase.py b/ipykernel/kernelbase.py index 3e9ce0f7c..62e4fa239 100644 --- a/ipykernel/kernelbase.py +++ b/ipykernel/kernelbase.py @@ -845,7 +845,7 @@ async def execute_request(self, stream, ident, parent): if inspect.isawaitable(reply_content): reply_content = await reply_content else: - warnings.warn( + warnings.warn( # type:ignore[unreachable] _AWAITABLE_MESSAGE.format(func_name="do_execute", target=self.do_execute), PendingDeprecationWarning, stacklevel=1, @@ -907,7 +907,7 @@ async def complete_request(self, stream, ident, parent): if inspect.isawaitable(matches): matches = await matches else: - warnings.warn( + warnings.warn( # type:ignore[unreachable] _AWAITABLE_MESSAGE.format(func_name="do_complete", target=self.do_complete), PendingDeprecationWarning, stacklevel=1, @@ -941,7 +941,7 @@ async def inspect_request(self, stream, ident, parent): if inspect.isawaitable(reply_content): reply_content = await reply_content else: - warnings.warn( + warnings.warn( # type:ignore[unreachable] _AWAITABLE_MESSAGE.format(func_name="do_inspect", target=self.do_inspect), PendingDeprecationWarning, stacklevel=1, @@ -966,7 +966,7 @@ async def history_request(self, stream, ident, parent): if inspect.isawaitable(reply_content): reply_content = await reply_content else: - warnings.warn( + warnings.warn( # type:ignore[unreachable] _AWAITABLE_MESSAGE.format(func_name="do_history", target=self.do_history), PendingDeprecationWarning, stacklevel=1, @@ -1094,7 +1094,7 @@ async def shutdown_request(self, stream, ident, parent): if inspect.isawaitable(content): content = await content else: - warnings.warn( + warnings.warn( # type:ignore[unreachable] _AWAITABLE_MESSAGE.format(func_name="do_shutdown", target=self.do_shutdown), PendingDeprecationWarning, stacklevel=1, @@ -1133,7 +1133,7 @@ async def is_complete_request(self, stream, ident, parent): if inspect.isawaitable(reply_content): reply_content = await reply_content else: - warnings.warn( + warnings.warn( # type:ignore[unreachable] _AWAITABLE_MESSAGE.format(func_name="do_is_complete", target=self.do_is_complete), PendingDeprecationWarning, stacklevel=1, @@ -1155,7 +1155,7 @@ async def debug_request(self, stream, ident, parent): if inspect.isawaitable(reply_content): reply_content = await reply_content else: - warnings.warn( + warnings.warn( # type:ignore[unreachable] _AWAITABLE_MESSAGE.format( func_name="do_debug_request", target=self.do_debug_request ),