From 47e5f15f74065d9af9fd11385ef0ff462f1ad1cd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:01:17 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.14.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.1...v0.14.4) - [github.com/pre-commit/mirrors-mypy: v1.9.0 → v1.18.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.9.0...v1.18.2) --- .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 1ca11df..6669e06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: trailing-whitespace exclude: ^tests/fixtures/.* @@ -16,14 +16,14 @@ repos: - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.1 + rev: v0.14.4 hooks: - id: ruff args: [--fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.9.0 + rev: v1.18.2 hooks: - id: mypy additional_dependencies: From 070f69e3e4dfbf15bf8d5450155be4f8e07f5614 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:02:39 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- python/sphinx_rust/directives/_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sphinx_rust/directives/_core.py b/python/sphinx_rust/directives/_core.py index c6570c4..8fd9c5c 100644 --- a/python/sphinx_rust/directives/_core.py +++ b/python/sphinx_rust/directives/_core.py @@ -178,7 +178,7 @@ def create_object_xref( "reftarget": full_name, } ref = addnodes.pending_xref(full_name, **options) - name = full_name.split("::")[-1] + name = full_name.rsplit("::", maxsplit=1)[-1] ref += nodes.literal(name, name) return ref @@ -207,7 +207,7 @@ def create_source_xref( "classes": classes or [], } ref = addnodes.pending_xref(full_name, **options) - text = full_name.split("::")[-1] if text is None else text + text = full_name.rsplit("::", maxsplit=1)[-1] if text is None else text ref += nodes.literal(text, text) return ref