8000 Merge pull request #22044 from StefRe/fix/issue22039 · matplotlib/matplotlib@4497aa7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4497aa7

Browse files
authored
Merge pull request #22044 from StefRe/fix/issue22039
Get correct source code link for decorated functions
2 parents 62a299f + e7dae36 commit 4497aa7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,8 @@ def linkcode_resolve(domain, info):
604604
except AttributeError:
605605
return None
606606

607+
if inspect.isfunction(obj):
608+
obj = inspect.unwrap(obj)
607609
try:
608610
fn = inspect.getsourcefile(obj)
609611
except TypeError:

0 commit comments

Comments
 (0)
0