Skip to content

Commit

Permalink
🩹 Fix source link of wrapped functions
Browse files Browse the repository at this point in the history
  • Loading branch information
francois-rozet committed Oct 2, 2023
1 parent 8e176d3 commit 68dfac0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def linkcode_resolve(domain: str, info: dict) -> str:
for name in fullname.split('.'):
objct = getattr(objct, name)

if hasattr(objct, '__wrapped__'):
objct = objct.__wrapped__

try:
file = inspect.getsourcefile(objct)
file = file[file.rindex(package) :]
Expand Down

0 comments on commit 68dfac0

Please sign in to comment.