From 61319a53c6ada0f23754fd3586f765ba64fd4160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= Date: Thu, 16 Apr 2026 17:18:27 +0200 Subject: [PATCH 1/2] Fix linkcode_resolve --- docs/source/conf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 218df0329..c790a16b6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -94,7 +94,12 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> str | None: if domain != "py" or not info["module"]: return None - obj = _get_obj(info) + try: + obj = _get_obj(info) + except AttributeError: + # This can happen when trying to get a field typed at the class level, e.g. the + # gramian_weighting attribute of GramianWeightedAggregator. + return None file_name = _get_file_name(obj) if not file_name: From b0ff3658275621c4ab781539fcb03f64e1cbdd48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= Date: Thu, 16 Apr 2026 17:39:43 +0200 Subject: [PATCH 2/2] Simplify comment --- docs/source/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c790a16b6..c821b2fdc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -97,8 +97,7 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> str | None: try: obj = _get_obj(info) except AttributeError: - # This can happen when trying to get a field typed at the class level, e.g. the - # gramian_weighting attribute of GramianWeightedAggregator. + # This can happen when trying to get a field typed at the class level. return None file_name = _get_file_name(obj)