From 28f9cb5eda552b4ac8d3f1ff4b5f499da80e0eb5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:46:46 +0000 Subject: [PATCH 1/2] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.15.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.15.0) - [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.9.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.9.6) - [github.com/scientific-python/cookie: 2024.01.24 → 2025.01.22](https://github.com/scientific-python/cookie/compare/2024.01.24...2025.01.22) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58aa38ce..4d63e3e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: types_or: [yaml, html, json] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.8.0" + rev: "v1.15.0" hooks: - id: mypy files: ipykernel @@ -74,7 +74,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.0 + rev: v0.9.6 hooks: - id: ruff types_or: [python, jupyter] @@ -83,7 +83,7 @@ repos: types_or: [python, jupyter] - repo: https://github.com/scientific-python/cookie - rev: "2024.01.24" + rev: "2025.01.22" hooks: - id: sp-repo-review additional_dependencies: ["repo-review[cli]"] From 467d33821358213c4c3e06140fe659bdf9143084 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:46:57 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ipykernel/_version.py | 1 + ipykernel/ipkernel.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ipykernel/_version.py b/ipykernel/_version.py index b4c5b1da..16633063 100644 --- a/ipykernel/_version.py +++ b/ipykernel/_version.py @@ -1,6 +1,7 @@ """ store the current version info of the server. """ + from __future__ import annotations import re diff --git a/ipykernel/ipkernel.py b/ipykernel/ipkernel.py index 5c450169..15ca38cd 100644 --- a/ipykernel/ipkernel.py +++ b/ipykernel/ipkernel.py @@ -752,9 +752,9 @@ def run_closure(self: threading.Thread): for stream in [stdout, stderr]: if isinstance(stream, OutStream): if parent == kernel_thread_ident: - stream._thread_to_parent_header[ - self.ident - ] = kernel._new_threads_parent_header + stream._thread_to_parent_header[self.ident] = ( + kernel._new_threads_parent_header + ) else: stream._thread_to_parent[self.ident] = parent _threading_Thread_run(self)