From 4d2721be7cb8757831ce0c29d04cf71b44c35b44 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 16:58:03 +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.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.1...v0.14.5) - [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..fd9b368 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.5 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 8c2faba2d60ffb619f2c26312c12430a0c748553 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 16:59:35 +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