From 265aaba56acc1c790b38e4ba103824854084b140 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Tue, 5 Dec 2023 22:30:00 +0100 Subject: [PATCH] FIX: support `linkcheck` builder --- src/sphinx_api_relink/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sphinx_api_relink/__init__.py b/src/sphinx_api_relink/__init__.py index 26c3ab5..715614d 100644 --- a/src/sphinx_api_relink/__init__.py +++ b/src/sphinx_api_relink/__init__.py @@ -37,7 +37,6 @@ def setup(app: Sphinx) -> dict[str, Any]: def set_linkcode_resolve(app: Sphinx, _: BuildEnvironment) -> None: - raw_config = app.config._raw_config # pyright: ignore[reportPrivateUsage] github_repo: str | None = app.config.api_github_repo if github_repo is None: msg = ( @@ -46,7 +45,7 @@ def set_linkcode_resolve(app: Sphinx, _: BuildEnvironment) -> None: ) raise ValueError(msg) debug: bool = app.config.api_linkcode_debug - raw_config["linkcode_resolve"] = get_linkcode_resolve(github_repo, debug) + app.config.linkcode_resolve = get_linkcode_resolve(github_repo, debug) # type: ignore[attr-defined] def generate_apidoc(app: Sphinx, _: BuildEnvironment) -> None: