Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e079219

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR #22044: Get correct source code link for decorated functions
1 parent 8c597fb commit e079219

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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)