From bf498fd182ea62faddedb4b7ed60ab255964236b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:03:42 +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.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.1...v0.14.7) - [github.com/pre-commit/mirrors-mypy: v1.9.0 → v1.19.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.9.0...v1.19.0) --- .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..75f9b85 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.7 hooks: - id: ruff args: [--fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.9.0 + rev: v1.19.0 hooks: - id: mypy additional_dependencies: From 464823470b44073eb8ca600c6682cd7c94c708ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:06:03 +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