8000 DOC: Fix linkcode resolving for attrs-defined classes (#685) · nipype/pydra@29d3d1f · GitHub
[go: up one dir, main page]

Skip to content

Commit 29d3d1f

Browse files
authored
DOC: Fix linkcode resolving for attrs-defined classes (#685)
1 parent 649c2f4 commit 29d3d1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/sphinxext/github_link.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ def _linkcode_resolve(domain, info, package, url_fmt, revision):
4545

4646
class_name = info["fullname"].split(".")[0]
4747
module = __import__(info["module"], fromlist=[class_name])
48-
obj = attrgetter(info["fullname"])(module)
48+
49+
# FIXME: Bypass resolving for attrs-defined classes.
50+
try:
51+
obj = attrgetter(info["fullname"])(module)
52+
except AttributeError:
53+
return
4954

5055
# Unwrap the object to get the correct source
5156
# file in case that is wrapped by a decorator

0 commit comments

Comments
 (0)
0