From 32a5c2a730d3b9dbb304dc45944e06cfcc892876 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:08:10 +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/python-jsonschema/check-jsonschema: 0.31.1 → 0.31.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.31.1...0.31.2) - [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.9.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.9.7) - [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 62514712d..d36865156 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.31.1 + rev: 0.31.2 hooks: - id: check-github-workflows @@ -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.7 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 d9c597f1ae1cf0a915bb6111674ffc192f9d2957 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:08:42 +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/inprocess/client.py | 1 - ipykernel/ipkernel.py | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ipykernel/_version.py b/ipykernel/_version.py index b4c5b1dab..166330638 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/inprocess/client.py b/ipykernel/inprocess/client.py index 130a0c567..1dc8f81e6 100644 --- a/ipykernel/inprocess/client.py +++ b/ipykernel/inprocess/client.py @@ -11,7 +11,6 @@ # Imports # ----------------------------------------------------------------------------- - from typing import Any, Optional from jupyter_client.client import KernelClient diff --git a/ipykernel/ipkernel.py b/ipykernel/ipkernel.py index a91c14a5e..5ba500198 100644 --- a/ipykernel/ipkernel.py +++ b/ipykernel/ipkernel.py @@ -763,9 +763,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)