Skip to content

Commit 61319a5

Browse files
committed
Fix linkcode_resolve
1 parent 51b84e7 commit 61319a5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

docs/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> str | None:
9494
if domain != "py" or not info["module"]:
9595
return None
9696

97-
obj = _get_obj(info)
97+
try:
98+
obj = _get_obj(info)
99+
except AttributeError:
100+
# This can happen when trying to get a field typed at the class level, e.g. the
101+
# gramian_weighting attribute of GramianWeightedAggregator.
102+
return None
98103
file_name = _get_file_name(obj)
99104

100105
if not file_name:

0 commit comments

Comments
 (0)